1 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7 | FileCheck %s
2 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7 -fast-isel -fast-isel-abort=1 | FileCheck %s
4 ; CHECK-LABEL: .section __LLVM_STACKMAPS,__llvm_stackmaps
5 ; CHECK-NEXT: __LLVM_StackMaps:
17 ; Functions and stack size
18 ; CHECK-NEXT: .quad _constantargs
21 ; CHECK-NEXT: .quad _liveConstant
24 ; CHECK-NEXT: .quad _directFrameIdx
25 ; CHECK-NEXT: .quad 40
27 ; CHECK-NEXT: .quad _longid
32 ; CHECK-NEXT: .quad 2147483648
33 ; CHECK-NEXT: .quad 4294967295
34 ; CHECK-NEXT: .quad 4294967296
40 ; CHECK-NEXT: .long L{{.*}}-_constantargs
41 ; CHECK-NEXT: .short 0
42 ; CHECK-NEXT: .short 12
46 ; CHECK-NEXT: .short 8
47 ; CHECK-NEXT: .short 0
48 ; CHECK-NEXT: .short 0
49 ; CHECK-NEXT: .long -1
53 ; CHECK-NEXT: .short 8
54 ; CHECK-NEXT: .short 0
55 ; CHECK-NEXT: .short 0
56 ; CHECK-NEXT: .long -1
60 ; CHECK-NEXT: .short 8
61 ; CHECK-NEXT: .short 0
62 ; CHECK-NEXT: .short 0
63 ; CHECK-NEXT: .long 65536
67 ; CHECK-NEXT: .short 8
68 ; CHECK-NEXT: .short 0
69 ; CHECK-NEXT: .short 0
70 ; CHECK-NEXT: .long 2000000000
74 ; CHECK-NEXT: .short 8
75 ; CHECK-NEXT: .short 0
76 ; CHECK-NEXT: .short 0
77 ; CHECK-NEXT: .long 2147483647
81 ; CHECK-NEXT: .short 8
82 ; CHECK-NEXT: .short 0
83 ; CHECK-NEXT: .short 0
84 ; CHECK-NEXT: .long -1
88 ; CHECK-NEXT: .short 8
89 ; CHECK-NEXT: .short 0
90 ; CHECK-NEXT: .short 0
91 ; CHECK-NEXT: .long -1
95 ; CHECK-NEXT: .short 8
96 ; CHECK-NEXT: .short 0
97 ; CHECK-NEXT: .short 0
99 ; LargeConstant at index 0
100 ; CHECK-NEXT: .byte 5
101 ; CHECK-NEXT: .byte 0
102 ; CHECK-NEXT: .short 8
103 ; CHECK-NEXT: .short 0
104 ; CHECK-NEXT: .short 0
105 ; CHECK-NEXT: .long 0
106 ; LargeConstant at index 1
107 ; CHECK-NEXT: .byte 5
108 ; CHECK-NEXT: .byte 0
109 ; CHECK-NEXT: .short 8
110 ; CHECK-NEXT: .short 0
111 ; CHECK-NEXT: .short 0
112 ; CHECK-NEXT: .long 1
113 ; LargeConstant at index 2
114 ; CHECK-NEXT: .byte 5
115 ; CHECK-NEXT: .byte 0
116 ; CHECK-NEXT: .short 8
117 ; CHECK-NEXT: .short 0
118 ; CHECK-NEXT: .short 0
119 ; CHECK-NEXT: .long 2
121 ; CHECK-NEXT: .byte 4
122 ; CHECK-NEXT: .byte 0
123 ; CHECK-NEXT: .short 8
124 ; CHECK-NEXT: .short 0
125 ; CHECK-NEXT: .short 0
126 ; CHECK-NEXT: .long -1
128 define void @constantargs() {
130 tail call void (i64, i32, ...) @llvm.experimental.stackmap(i64 1, i32 15, i16 65535, i16 -1, i32 65536, i32 2000000000, i32 2147483647, i32 -1, i32 4294967295, i32 4294967296, i64 2147483648, i64 4294967295, i64 4294967296, i64 -1)
134 ; Map a constant value.
136 ; CHECK-LABEL: .long L{{.*}}-_liveConstant
137 ; CHECK-NEXT: .short 0
139 ; CHECK-NEXT: .short 1
140 ; Loc 0: SmallConstant
141 ; CHECK-NEXT: .byte 4
142 ; CHECK-NEXT: .byte 0
143 ; CHECK-NEXT: .short 8
144 ; CHECK-NEXT: .short 0
145 ; CHECK-NEXT: .short 0
146 ; CHECK-NEXT: .long 33
148 define void @liveConstant() {
149 tail call void (i64, i32, ...) @llvm.experimental.stackmap(i64 15, i32 5, i32 33)
153 ; Directly map an alloca's address.
156 ; CHECK-LABEL: .long L{{.*}}-_directFrameIdx
157 ; CHECK-NEXT: .short 0
159 ; CHECK-NEXT: .short 1
160 ; Loc 0: Direct rbp - ofs
161 ; CHECK-NEXT: .byte 2
162 ; CHECK-NEXT: .byte 0
163 ; CHECK-NEXT: .short 8
164 ; CHECK-NEXT: .short 6
165 ; CHECK-NEXT: .short 0
168 define void @directFrameIdx() {
170 %metadata1 = alloca i64, i32 3, align 8
171 store i64 11, i64* %metadata1
172 store i64 12, i64* %metadata1
173 store i64 13, i64* %metadata1
174 call void (i64, i32, ...) @llvm.experimental.stackmap(i64 16, i32 0, i64* %metadata1)
180 ; CHECK: .quad 4294967295
181 ; CHECK-LABEL: .long L{{.*}}-_longid
182 ; CHECK: .quad 4294967296
183 ; CHECK-LABEL: .long L{{.*}}-_longid
184 ; CHECK: .quad 9223372036854775807
185 ; CHECK-LABEL: .long L{{.*}}-_longid
187 ; CHECK-LABEL: .long L{{.*}}-_longid
188 define void @longid() {
190 tail call void (i64, i32, ...) @llvm.experimental.stackmap(i64 4294967295, i32 0)
191 tail call void (i64, i32, ...) @llvm.experimental.stackmap(i64 4294967296, i32 0)
192 tail call void (i64, i32, ...) @llvm.experimental.stackmap(i64 9223372036854775807, i32 0)
193 tail call void (i64, i32, ...) @llvm.experimental.stackmap(i64 -1, i32 0)
197 declare void @llvm.experimental.stackmap(i64, i32, ...)