1 ; RUN: llc -filetype=asm -o - -mtriple=mips-unknown-linux-gnu < %s | FileCheck --check-prefix=CHECK --check-prefix=CHECK-MIPS32 %s
2 ; RUN: llc -filetype=asm -o - -mtriple=mipsel-unknown-linux-gnu < %s | FileCheck --check-prefix=CHECK --check-prefix=CHECK-MIPS32 %s
3 ; RUN: llc -filetype=asm -o - -mtriple=mips64-unknown-linux-gnu < %s | FileCheck --check-prefix=CHECK --check-prefix=CHECK-MIPS64 %s
4 ; RUN: llc -filetype=asm -o - -mtriple=mips64el-unknown-linux-gnu < %s | FileCheck --check-prefix=CHECK --check-prefix=CHECK-MIPS64 %s
6 define i32 @foo() nounwind noinline uwtable "function-instrument"="xray-always" {
8 ; CHECK-MIPS64-LABEL: .Lxray_sled_0:
9 ; CHECK-MIPS32-LABEL: $xray_sled_0:
10 ; CHECK-MIPS64: b .Ltmp0
11 ; CHECK-MIPS32: b $tmp0
27 ; CHECK-MIPS64-LABEL: .Ltmp0:
28 ; CHECK-MIPS32-LABEL: $tmp0:
29 ; CHECK-MIPS32: addiu $25, $25, 52
32 ; CHECK-MIPS64-LABEL: .Lxray_sled_1:
33 ; CHECK-MIPS32-LABEL: $xray_sled_1:
34 ; CHECK-MIPS64: b .Ltmp1
35 ; CHECK-MIPS32: b $tmp1
51 ; CHECK-MIPS64-LABEL: .Ltmp1:
52 ; CHECK-MIPS32-LABEL: $tmp1:
53 ; CHECK-MIPS32: addiu $25, $25, 52
55 ; CHECK: .section xray_instr_map,{{.*}}
56 ; CHECK-MIPS64: .8byte .Lxray_sled_0
57 ; CHECK-MIPS64: .8byte .Lxray_sled_1
58 ; CHECK-MIPS32: .4byte ($xray_sled_0)
59 ; CHECK-MIPS32: .4byte ($xray_sled_1)
61 ; We test multiple returns in a single function to make sure we're getting all
62 ; of them with XRay instrumentation.
63 define i32 @bar(i32 %i) nounwind noinline uwtable "function-instrument"="xray-always" {
65 ; CHECK-MIPS64-LABEL: .Lxray_sled_2:
66 ; CHECK-MIPS32-LABEL: $xray_sled_2:
67 ; CHECK-MIPS64: b .Ltmp2
68 ; CHECK-MIPS32: b $tmp2
84 ; CHECK-MIPS64-LABEL: .Ltmp2:
85 ; CHECK-MIPS32-LABEL: $tmp2:
86 ; CHECK-MIPS32: addiu $25, $25, 52
88 %cond = icmp eq i32 %i, 0
89 br i1 %cond, label %IsEqual, label %NotEqual
93 ; CHECK-MIPS64-LABEL: .Lxray_sled_3:
94 ; CHECK-MIPS32-LABEL: $xray_sled_3:
95 ; CHECK-MIPS64: b .Ltmp3
96 ; CHECK-MIPS32: b $tmp3
112 ; CHECK-MIPS64-LABEL: .Ltmp3:
113 ; CHECK-MIPS32-LABEL: $tmp3:
114 ; CHECK-MIPS32: addiu $25, $25, 52
118 ; CHECK-MIPS64-LABEL: .Lxray_sled_4:
119 ; CHECK-MIPS32-LABEL: $xray_sled_4:
120 ; CHECK-MIPS64: b .Ltmp4
121 ; CHECK-MIPS32: b $tmp4
137 ; CHECK-MIPS64-LABEL: .Ltmp4:
138 ; CHECK-MIPS32-LABEL: $tmp4:
139 ; CHECK-MIPS32: addiu $25, $25, 52
141 ; CHECK: .section xray_instr_map,{{.*}}
142 ; CHECK-MIPS64: .8byte .Lxray_sled_2
143 ; CHECK-MIPS64: .8byte .Lxray_sled_3
144 ; CHECK-MIPS64: .8byte .Lxray_sled_4
145 ; CHECK-MIPS32: .4byte ($xray_sled_2)
146 ; CHECK-MIPS32: .4byte ($xray_sled_3)
147 ; CHECK-MIPS32: .4byte ($xray_sled_4)