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 .Ltmp1
11 ; CHECK-MIPS32: b $tmp1
27 ; CHECK-MIPS64-LABEL: .Ltmp1:
28 ; CHECK-MIPS32-LABEL: $tmp1:
29 ; CHECK-MIPS32: addiu $25, $25, 52
32 ; CHECK-MIPS64-LABEL: .Lxray_sled_1:
33 ; CHECK-MIPS64-NEXT: b .Ltmp2
34 ; CHECK-MIPS32-LABEL: $xray_sled_1:
35 ; CHECK-MIPS32-NEXT: b $tmp2
51 ; CHECK-MIPS64-LABEL: .Ltmp2:
52 ; CHECK-MIPS32-LABEL: $tmp2:
53 ; CHECK-MIPS32: addiu $25, $25, 52
55 ; CHECK: .section xray_instr_map,"ao",@progbits,foo
56 ; CHECK-MIPS64: .Ltmp3:
57 ; CHECK-MIPS64-NEXT: .8byte .Lxray_sled_0-.Ltmp3
58 ; CHECK-MIPS64-NEXT: .8byte .Lfunc_begin0-(.Ltmp3+8)
59 ; CHECK-MIPS32: $tmp3:
60 ; CHECK-MIPS32-NEXT: .4byte ($xray_sled_0)-($tmp3)
61 ; CHECK-MIPS32-NEXT: .4byte ($func_begin0)-(($tmp3)+4)
63 ; We test multiple returns in a single function to make sure we're getting all
64 ; of them with XRay instrumentation.
65 define i32 @bar(i32 %i) nounwind noinline uwtable "function-instrument"="xray-always" {
67 ; CHECK-MIPS64-LABEL: .Lxray_sled_2:
68 ; CHECK-MIPS64-NEXT: b .Ltmp6
69 ; CHECK-MIPS32-LABEL: $xray_sled_2:
70 ; CHECK-MIPS32-NEXT: b $tmp6
86 ; CHECK-MIPS64-LABEL: .Ltmp6:
87 ; CHECK-MIPS32-LABEL: $tmp6:
88 ; CHECK-MIPS32: addiu $25, $25, 52
90 %cond = icmp eq i32 %i, 0
91 br i1 %cond, label %IsEqual, label %NotEqual
95 ; CHECK-MIPS64-LABEL: .Lxray_sled_3:
96 ; CHECK-MIPS64-NEXT: b .Ltmp7
97 ; CHECK-MIPS32-LABEL: $xray_sled_3:
98 ; CHECK-MIPS32-NEXT: b $tmp7
114 ; CHECK-MIPS64-LABEL: .Ltmp7:
115 ; CHECK-MIPS32-LABEL: $tmp7:
116 ; CHECK-MIPS32: addiu $25, $25, 52
120 ; CHECK-MIPS64-LABEL: .Lxray_sled_4:
121 ; CHECK-MIPS64-NEXT: b .Ltmp8
122 ; CHECK-MIPS32-LABEL: $xray_sled_4:
123 ; CHECK-MIPS32-NEXT: b $tmp8
139 ; CHECK-MIPS64-LABEL: .Ltmp8:
140 ; CHECK-MIPS32-LABEL: $tmp8:
141 ; CHECK-MIPS32: addiu $25, $25, 52
143 ; CHECK: .section xray_instr_map,{{.*}}
144 ; CHECK-MIPS64: .8byte .Lxray_sled_2
145 ; CHECK-MIPS64: .8byte .Lxray_sled_3
146 ; CHECK-MIPS64: .8byte .Lxray_sled_4
147 ; CHECK-MIPS32: .4byte ($xray_sled_2)-($tmp9)
148 ; CHECK-MIPS32: .4byte ($xray_sled_3)-($tmp10)
149 ; CHECK-MIPS32: .4byte ($xray_sled_4)-($tmp11)