1 ; RUN: llc -mtriple=thumbv4t-eabi %s -o - | FileCheck --check-prefix=CHECK -check-prefix=CHECK-V4T %s
2 ; RUN: llc -mtriple=thumbv5t-eabi %s -o - | FileCheck --check-prefix=CHECK -check-prefix=CHECK-V5T %s
4 @f = common global ptr null, align 4
7 define void @foo(i32 %x) {
9 %0 = load ptr, ptr @f, align 4
10 tail call void %0(i32 %x)
13 ; CHECK: ldr [[TMP:r[0-3]]], [[F:\.[A-Z0-9_]+]]
14 ; CHECK: ldr [[CALLEE:r[0-3]]], [[[TMP]]]
17 ; CHECK-V4T: bl [[INDIRECT_PAD:\.Ltmp[0-9]+]]
19 ; CHECK-V4T: [[INDIRECT_PAD]]:
20 ; CHECK-V4T-NEXT: bx [[CALLEE]]
21 ; CHECK-V5T: blx [[CALLEE]]
25 define void @bar(ptr nocapture %g, i32 %x, ptr nocapture %h) {
27 tail call void %g(i32 %x)
28 tail call void %h(i32 %x)
31 ; CHECK-V4T: bl [[INDIRECT_PAD1:\.Ltmp[0-9]+]]
32 ; CHECK-V4T: bl [[INDIRECT_PAD2:\.Ltmp[0-9]+]]
33 ; CHECK-V4T: [[INDIRECT_PAD1]]:
35 ; CHECK-V4T: [[INDIRECT_PAD2]]: