1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2; RUN: llc -mtriple=riscv32 -verify-machineinstrs < %s \ 3; RUN: | FileCheck %s -check-prefix=RV32I 4 5define i32 @indirectbr(i8* %target) nounwind { 6; RV32I-LABEL: indirectbr: 7; RV32I: # %bb.0: 8; RV32I-NEXT: jr a0 9; RV32I-NEXT: .LBB0_1: # %test_label 10; RV32I-NEXT: mv a0, zero 11; RV32I-NEXT: ret 12 indirectbr i8* %target, [label %test_label] 13test_label: 14 br label %ret 15ret: 16 ret i32 0 17} 18 19define i32 @indirectbr_with_offset(i8* %a) nounwind { 20; RV32I-LABEL: indirectbr_with_offset: 21; RV32I: # %bb.0: 22; RV32I-NEXT: jr 1380(a0) 23; RV32I-NEXT: .LBB1_1: # %test_label 24; RV32I-NEXT: mv a0, zero 25; RV32I-NEXT: ret 26 %target = getelementptr inbounds i8, i8* %a, i32 1380 27 indirectbr i8* %target, [label %test_label] 28test_label: 29 br label %ret 30ret: 31 ret i32 0 32} 33