1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2 ; RUN: llc -mtriple=xtensa -verify-machineinstrs < %s \
3 ; RUN: | FileCheck -check-prefix=XTENSA %s
5 define i32 @indirectbr(i8* %target) nounwind {
6 ; XTENSA-LABEL: indirectbr:
8 ; XTENSA-NEXT: .LBB0_1: # %test_label
9 ; XTENSA-NEXT: movi a2, 0
11 indirectbr i8* %target, [label %test_label]
18 define i32 @indirectbr_with_offset(i8* %a) nounwind {
19 ; XTENSA-LABEL: indirectbr_with_offset:
20 ; XTENSA: movi a8, 1380
21 ; XTENSA-NEXT: add a8, a2, a8
23 ; XTENSA-NEXT: .LBB1_1: # %test_label
24 ; XTENSA-NEXT: movi a2, 0
26 %target = getelementptr inbounds i8, i8* %a, i32 1380
27 indirectbr i8* %target, [label %test_label]