33 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -mtriple=riscv32 -verify-machineinstrs < %s \3; RUN: | FileCheck %s -check-prefix=RV32I4 5define i32 @indirectbr(ptr %target) nounwind {6; RV32I-LABEL: indirectbr:7; RV32I: # %bb.0:8; RV32I-NEXT: jr a09; RV32I-NEXT: .LBB0_1: # %test_label10; RV32I-NEXT: li a0, 011; RV32I-NEXT: ret12 indirectbr ptr %target, [label %test_label]13test_label:14 br label %ret15ret:16 ret i32 017}18 19define i32 @indirectbr_with_offset(ptr %a) nounwind {20; RV32I-LABEL: indirectbr_with_offset:21; RV32I: # %bb.0:22; RV32I-NEXT: jr 1380(a0)23; RV32I-NEXT: .LBB1_1: # %test_label24; RV32I-NEXT: li a0, 025; RV32I-NEXT: ret26 %target = getelementptr inbounds i8, ptr %a, i32 138027 indirectbr ptr %target, [label %test_label]28test_label:29 br label %ret30ret:31 ret i32 032}33