1 ; RUN: llc -mtriple=mips-unknown-linux-gnu < %s | FileCheck --check-prefix=CHECK --check-prefix=CHECK-MIPS32 %s
2 ; RUN: llc -mtriple=mipsel-unknown-linux-gnu < %s | FileCheck --check-prefix=CHECK --check-prefix=CHECK-MIPS32 %s
3 ; RUN: llc -mtriple=mips64-unknown-linux-gnu < %s | FileCheck --check-prefix=CHECK --check-prefix=CHECK-MIPS64 %s
4 ; RUN: llc -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-NEXT: b [[TMP:(\.L|\$)tmp[0-9]+]]
26 ; CHECK-NEXT: [[TMP]]:
27 ; CHECK-MIPS32-NEXT: addiu $25, $25, 52
30 ; CHECK-MIPS64-LABEL: .Lxray_sled_1:
31 ; CHECK-MIPS32-LABEL: $xray_sled_1:
32 ; CHECK-NEXT: b [[TMP:(\.L|\$)tmp[0-9]+]]
49 ; CHECK-MIPS32: addiu $25, $25, 52
51 ; CHECK: .section xray_instr_map,"ao",@progbits,foo
52 ; CHECK-MIPS64: [[TMP:.Ltmp[0-9]+]]:
53 ; CHECK-MIPS64-NEXT: .8byte .Lxray_sled_0-[[TMP]]
54 ; CHECK-MIPS64-NEXT: .8byte .Lfunc_begin0-([[TMP]]+8)
55 ; CHECK-MIPS32: [[TMP:\$tmp[0-9]+]]:
56 ; CHECK-MIPS32-NEXT: .4byte ($xray_sled_0)-([[TMP]])
57 ; CHECK-MIPS32-NEXT: .4byte ($func_begin0)-(([[TMP]])+4)
59 ; We test multiple returns in a single function to make sure we're getting all
60 ; of them with XRay instrumentation.
61 define i32 @bar(i32 %i) nounwind noinline uwtable "function-instrument"="xray-always" {
63 ; CHECK-MIPS64-LABEL: .Lxray_sled_2:
64 ; CHECK-MIPS32-LABEL: $xray_sled_2:
65 ; CHECK-NEXT: b [[TMP:(\.L|\$)tmp[0-9]+]]
82 ; CHECK-MIPS32: addiu $25, $25, 52
84 %cond = icmp eq i32 %i, 0
85 br i1 %cond, label %IsEqual, label %NotEqual
89 ; CHECK-MIPS64-LABEL: .Lxray_sled_3:
90 ; CHECK-MIPS32-LABEL: $xray_sled_3:
91 ; CHECK-NEXT: b [[TMP:(\.L|\$)tmp[0-9]+]]
107 ; CHECK-NEXT: [[TMP]]:
108 ; CHECK-MIPS32: addiu $25, $25, 52
112 ; CHECK-MIPS64-LABEL: .Lxray_sled_4:
113 ; CHECK-MIPS32-LABEL: $xray_sled_4:
114 ; CHECK-NEXT: b [[TMP:(\.L|\$)tmp[0-9]+]]
130 ; CHECK-NEXT: [[TMP]]:
131 ; CHECK-MIPS32: addiu $25, $25, 52
133 ; CHECK: .section xray_instr_map,"ao",@progbits,bar
134 ; CHECK-MIPS64: .8byte .Lxray_sled_2
135 ; CHECK-MIPS64: .8byte .Lxray_sled_3
136 ; CHECK-MIPS64: .8byte .Lxray_sled_4
137 ; CHECK-MIPS32: [[TMP:\$tmp[0-9]+]]:
138 ; CHECK-MIPS32-NEXT: .4byte ($xray_sled_2)-([[TMP]])
139 ; CHECK-MIPS32: [[TMP:\$tmp[0-9]+]]:
140 ; CHECK-MIPS32-NEXT: .4byte ($xray_sled_3)-([[TMP]])
141 ; CHECK-MIPS32: [[TMP:\$tmp[0-9]+]]:
142 ; CHECK-MIPS32-NEXT: .4byte ($xray_sled_4)-([[TMP]])