1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc --mtriple=loongarch64 -mattr=+d < %s | FileCheck %s
4 define i32 @indirectbr(ptr %target) nounwind {
5 ; CHECK-LABEL: indirectbr:
8 ; CHECK-NEXT: .LBB0_1: # %test_label
9 ; CHECK-NEXT: move $a0, $zero
11 indirectbr ptr %target, [label %test_label]
18 define i32 @indirectbr_with_offset(ptr %a) nounwind {
19 ; CHECK-LABEL: indirectbr_with_offset:
21 ; CHECK-NEXT: jirl $zero, $a0, 1380
22 ; CHECK-NEXT: .LBB1_1: # %test_label
23 ; CHECK-NEXT: move $a0, $zero
25 %target = getelementptr inbounds i8, ptr %a, i32 1380
26 indirectbr ptr %target, [label %test_label]