Skip to content

Commit 0bebc38

Browse files
committedSep 12, 2016
Fix the Thumb test for vfloat intrinsics
Summary: This test was not testing the intrinsics. A function like this: define %v4f32 @test_v4f32.floor(%v4f32 %a){ ... %1 = call %v4f32 @llvm.floor.v4f32(%v4f32 %a) ... } is transformed into the following assembly: _test_v4f32.floor: @ @test_v4f32.floor ... bl _floorf ... In each function tested, there are two CHECK: one that checked for the label and another one for the intrinsic that should be used inside the function (in our case, "floor"). However, although the first CHECK was matching the label, the second was not matching the intrinsic, but the second "floor" in the same line as the label. This is fixed by making the first CHECK match the entire line. Reviewers: jmolloy, rengolin Subscribers: rengolin, llvm-commits Differential Revision: https://reviews.llvm.org/D24398 llvm-svn: 281211
1 parent c7e1e03 commit 0bebc38

File tree

1 file changed

+56
-55
lines changed

1 file changed

+56
-55
lines changed
 

Diff for: ‎llvm/test/CodeGen/ARM/vfloatintrinsics.ll

+56-55
Original file line numberDiff line numberDiff line change
@@ -5,103 +5,103 @@ target triple = "thumbv7-apple-ios6.1.0"
55
;;; Float vectors
66

77
%v2f32 = type <2 x float>
8-
; CHECK: test_v2f32.sqrt:
8+
; CHECK-LABEL: test_v2f32.sqrt:{{.*}}
99
define %v2f32 @test_v2f32.sqrt(%v2f32 %a) {
1010
; CHECK: sqrt
1111
%1 = call %v2f32 @llvm.sqrt.v2f32(%v2f32 %a)
1212
ret %v2f32 %1
1313
}
14-
; CHECK: test_v2f32.powi:
14+
; CHECK-LABEL: test_v2f32.powi:{{.*}}
1515
define %v2f32 @test_v2f32.powi(%v2f32 %a, i32 %b) {
1616
; CHECK: pow
1717
%1 = call %v2f32 @llvm.powi.v2f32(%v2f32 %a, i32 %b)
1818
ret %v2f32 %1
1919
}
20-
; CHECK: test_v2f32.sin:
20+
; CHECK-LABEL: test_v2f32.sin:{{.*}}
2121
define %v2f32 @test_v2f32.sin(%v2f32 %a) {
2222
; CHECK: sin
2323
%1 = call %v2f32 @llvm.sin.v2f32(%v2f32 %a)
2424
ret %v2f32 %1
2525
}
26-
; CHECK: test_v2f32.cos:
26+
; CHECK-LABEL: test_v2f32.cos:{{.*}}
2727
define %v2f32 @test_v2f32.cos(%v2f32 %a) {
2828
; CHECK: cos
2929
%1 = call %v2f32 @llvm.cos.v2f32(%v2f32 %a)
3030
ret %v2f32 %1
3131
}
32-
; CHECK: test_v2f32.pow:
32+
; CHECK-LABEL: test_v2f32.pow:{{.*}}
3333
define %v2f32 @test_v2f32.pow(%v2f32 %a, %v2f32 %b) {
3434
; CHECK: pow
3535
%1 = call %v2f32 @llvm.pow.v2f32(%v2f32 %a, %v2f32 %b)
3636
ret %v2f32 %1
3737
}
38-
; CHECK: test_v2f32.exp:
38+
; CHECK-LABEL: test_v2f32.exp:{{.*}}
3939
define %v2f32 @test_v2f32.exp(%v2f32 %a) {
4040
; CHECK: exp
4141
%1 = call %v2f32 @llvm.exp.v2f32(%v2f32 %a)
4242
ret %v2f32 %1
4343
}
44-
; CHECK: test_v2f32.exp2:
44+
; CHECK-LABEL: test_v2f32.exp2:{{.*}}
4545
define %v2f32 @test_v2f32.exp2(%v2f32 %a) {
4646
; CHECK: exp
4747
%1 = call %v2f32 @llvm.exp2.v2f32(%v2f32 %a)
4848
ret %v2f32 %1
4949
}
50-
; CHECK: test_v2f32.log:
50+
; CHECK-LABEL: test_v2f32.log:{{.*}}
5151
define %v2f32 @test_v2f32.log(%v2f32 %a) {
5252
; CHECK: log
5353
%1 = call %v2f32 @llvm.log.v2f32(%v2f32 %a)
5454
ret %v2f32 %1
5555
}
56-
; CHECK: test_v2f32.log10:
56+
; CHECK-LABEL: test_v2f32.log10:{{.*}}
5757
define %v2f32 @test_v2f32.log10(%v2f32 %a) {
5858
; CHECK: log
5959
%1 = call %v2f32 @llvm.log10.v2f32(%v2f32 %a)
6060
ret %v2f32 %1
6161
}
62-
; CHECK: test_v2f32.log2:
62+
; CHECK-LABEL: test_v2f32.log2:{{.*}}
6363
define %v2f32 @test_v2f32.log2(%v2f32 %a) {
6464
; CHECK: log
6565
%1 = call %v2f32 @llvm.log2.v2f32(%v2f32 %a)
6666
ret %v2f32 %1
6767
}
68-
; CHECK: test_v2f32.fma:
68+
; CHECK: test_v2f32.fma:{{.*}}
6969
define %v2f32 @test_v2f32.fma(%v2f32 %a, %v2f32 %b, %v2f32 %c) {
7070
; CHECK: fma
7171
%1 = call %v2f32 @llvm.fma.v2f32(%v2f32 %a, %v2f32 %b, %v2f32 %c)
7272
ret %v2f32 %1
7373
}
74-
; CHECK: test_v2f32.fabs:
74+
; CHECK-LABEL: test_v2f32.fabs:{{.*}}
7575
define %v2f32 @test_v2f32.fabs(%v2f32 %a) {
76-
; CHECK: fabs
76+
; CHECK: vabs.f32
7777
%1 = call %v2f32 @llvm.fabs.v2f32(%v2f32 %a)
7878
ret %v2f32 %1
7979
}
80-
; CHECK: test_v2f32.floor:
80+
; CHECK-LABEL: test_v2f32.floor:{{.*}}
8181
define %v2f32 @test_v2f32.floor(%v2f32 %a) {
82-
; CHECK: floor
82+
; CHECK: _floorf
8383
%1 = call %v2f32 @llvm.floor.v2f32(%v2f32 %a)
8484
ret %v2f32 %1
8585
}
86-
; CHECK: test_v2f32.fceil:
86+
; CHECK-LABEL: test_v2f32.fceil:{{.*}}
8787
define %v2f32 @test_v2f32.fceil(%v2f32 %a) {
8888
; CHECK: ceil
8989
%1 = call %v2f32 @llvm.fceil.v2f32(%v2f32 %a)
9090
ret %v2f32 %1
9191
}
92-
; CHECK: test_v2f32.trunc:
92+
; CHECK-LABEL: test_v2f32.trunc:{{.*}}
9393
define %v2f32 @test_v2f32.trunc(%v2f32 %a) {
9494
; CHECK: trunc
9595
%1 = call %v2f32 @llvm.trunc.v2f32(%v2f32 %a)
9696
ret %v2f32 %1
9797
}
98-
; CHECK: test_v2f32.rint:
98+
; CHECK-LABEL: test_v2f32.rint:{{.*}}
9999
define %v2f32 @test_v2f32.rint(%v2f32 %a) {
100100
; CHECK: rint
101101
%1 = call %v2f32 @llvm.rint.v2f32(%v2f32 %a)
102102
ret %v2f32 %1
103103
}
104-
; CHECK: test_v2f32.nearbyint:
104+
; CHECK-LABEL: test_v2f32.nearbyint:{{.*}}
105105
define %v2f32 @test_v2f32.nearbyint(%v2f32 %a) {
106106
; CHECK: nearbyint
107107
%1 = call %v2f32 @llvm.nearbyint.v2f32(%v2f32 %a)
@@ -129,103 +129,103 @@ declare %v2f32 @llvm.nearbyint.v2f32(%v2f32) #0
129129
;;;
130130

131131
%v4f32 = type <4 x float>
132-
; CHECK: test_v4f32.sqrt:
132+
; CHECK-LABEL: test_v4f32.sqrt:{{.*}}
133133
define %v4f32 @test_v4f32.sqrt(%v4f32 %a) {
134134
; CHECK: sqrt
135135
%1 = call %v4f32 @llvm.sqrt.v4f32(%v4f32 %a)
136136
ret %v4f32 %1
137137
}
138-
; CHECK: test_v4f32.powi:
138+
; CHECK-LABEL: test_v4f32.powi:{{.*}}
139139
define %v4f32 @test_v4f32.powi(%v4f32 %a, i32 %b) {
140140
; CHECK: pow
141141
%1 = call %v4f32 @llvm.powi.v4f32(%v4f32 %a, i32 %b)
142142
ret %v4f32 %1
143143
}
144-
; CHECK: test_v4f32.sin:
144+
; CHECK-LABEL: test_v4f32.sin:{{.*}}
145145
define %v4f32 @test_v4f32.sin(%v4f32 %a) {
146146
; CHECK: sin
147147
%1 = call %v4f32 @llvm.sin.v4f32(%v4f32 %a)
148148
ret %v4f32 %1
149149
}
150-
; CHECK: test_v4f32.cos:
150+
; CHECK-LABEL: test_v4f32.cos:{{.*}}
151151
define %v4f32 @test_v4f32.cos(%v4f32 %a) {
152152
; CHECK: cos
153153
%1 = call %v4f32 @llvm.cos.v4f32(%v4f32 %a)
154154
ret %v4f32 %1
155155
}
156-
; CHECK: test_v4f32.pow:
156+
; CHECK-LABEL: test_v4f32.pow:{{.*}}
157157
define %v4f32 @test_v4f32.pow(%v4f32 %a, %v4f32 %b) {
158158
; CHECK: pow
159159
%1 = call %v4f32 @llvm.pow.v4f32(%v4f32 %a, %v4f32 %b)
160160
ret %v4f32 %1
161161
}
162-
; CHECK: test_v4f32.exp:
162+
; CHECK-LABEL: test_v4f32.exp:{{.*}}
163163
define %v4f32 @test_v4f32.exp(%v4f32 %a) {
164164
; CHECK: exp
165165
%1 = call %v4f32 @llvm.exp.v4f32(%v4f32 %a)
166166
ret %v4f32 %1
167167
}
168-
; CHECK: test_v4f32.exp2:
168+
; CHECK-LABEL: test_v4f32.exp2:{{.*}}
169169
define %v4f32 @test_v4f32.exp2(%v4f32 %a) {
170170
; CHECK: exp
171171
%1 = call %v4f32 @llvm.exp2.v4f32(%v4f32 %a)
172172
ret %v4f32 %1
173173
}
174-
; CHECK: test_v4f32.log:
174+
; CHECK-LABEL: test_v4f32.log:{{.*}}
175175
define %v4f32 @test_v4f32.log(%v4f32 %a) {
176176
; CHECK: log
177177
%1 = call %v4f32 @llvm.log.v4f32(%v4f32 %a)
178178
ret %v4f32 %1
179179
}
180-
; CHECK: test_v4f32.log10:
180+
; CHECK-LABEL: test_v4f32.log10:{{.*}}
181181
define %v4f32 @test_v4f32.log10(%v4f32 %a) {
182182
; CHECK: log
183183
%1 = call %v4f32 @llvm.log10.v4f32(%v4f32 %a)
184184
ret %v4f32 %1
185185
}
186-
; CHECK: test_v4f32.log2:
186+
; CHECK-LABEL: test_v4f32.log2:{{.*}}
187187
define %v4f32 @test_v4f32.log2(%v4f32 %a) {
188188
; CHECK: log
189189
%1 = call %v4f32 @llvm.log2.v4f32(%v4f32 %a)
190190
ret %v4f32 %1
191191
}
192-
; CHECK: test_v4f32.fma:
192+
; CHECK-LABEL: test_v4f32.fma:{{.*}}
193193
define %v4f32 @test_v4f32.fma(%v4f32 %a, %v4f32 %b, %v4f32 %c) {
194194
; CHECK: fma
195195
%1 = call %v4f32 @llvm.fma.v4f32(%v4f32 %a, %v4f32 %b, %v4f32 %c)
196196
ret %v4f32 %1
197197
}
198-
; CHECK: test_v4f32.fabs:
198+
; CHECK-LABEL: test_v4f32.fabs:{{.*}}
199199
define %v4f32 @test_v4f32.fabs(%v4f32 %a) {
200-
; CHECK: fabs
200+
; CHECK: vabs.f32
201201
%1 = call %v4f32 @llvm.fabs.v4f32(%v4f32 %a)
202202
ret %v4f32 %1
203203
}
204-
; CHECK: test_v4f32.floor:
204+
; CHECK-LABEL: test_v4f32.floor:{{.*}}
205205
define %v4f32 @test_v4f32.floor(%v4f32 %a) {
206206
; CHECK: floor
207207
%1 = call %v4f32 @llvm.floor.v4f32(%v4f32 %a)
208208
ret %v4f32 %1
209209
}
210-
; CHECK: test_v4f32.fceil:
210+
; CHECK-LABEL: test_v4f32.fceil:{{.*}}
211211
define %v4f32 @test_v4f32.fceil(%v4f32 %a) {
212212
; CHECK: ceil
213213
%1 = call %v4f32 @llvm.fceil.v4f32(%v4f32 %a)
214214
ret %v4f32 %1
215215
}
216-
; CHECK: test_v4f32.trunc:
216+
; CHECK-LABEL: test_v4f32.trunc:{{.*}}
217217
define %v4f32 @test_v4f32.trunc(%v4f32 %a) {
218218
; CHECK: trunc
219219
%1 = call %v4f32 @llvm.trunc.v4f32(%v4f32 %a)
220220
ret %v4f32 %1
221221
}
222-
; CHECK: test_v4f32.rint:
222+
; CHECK-LABEL: test_v4f32.rint:{{.*}}
223223
define %v4f32 @test_v4f32.rint(%v4f32 %a) {
224224
; CHECK: rint
225225
%1 = call %v4f32 @llvm.rint.v4f32(%v4f32 %a)
226226
ret %v4f32 %1
227227
}
228-
; CHECK: test_v4f32.nearbyint:
228+
; CHECK-LABEL: test_v4f32.nearbyint:{{.*}}
229229
define %v4f32 @test_v4f32.nearbyint(%v4f32 %a) {
230230
; CHECK: nearbyint
231231
%1 = call %v4f32 @llvm.nearbyint.v4f32(%v4f32 %a)
@@ -253,103 +253,104 @@ declare %v4f32 @llvm.nearbyint.v4f32(%v4f32) #0
253253
;;; Double vector
254254

255255
%v2f64 = type <2 x double>
256-
; CHECK: test_v2f64.sqrt:
256+
; CHECK-LABEL: test_v2f64.sqrt:{{.*}}
257257
define %v2f64 @test_v2f64.sqrt(%v2f64 %a) {
258258
; CHECK: sqrt
259259
%1 = call %v2f64 @llvm.sqrt.v2f64(%v2f64 %a)
260260
ret %v2f64 %1
261261
}
262-
; CHECK: test_v2f64.powi:
262+
; CHECK-LABEL: test_v2f64.powi:{{.*}}
263263
define %v2f64 @test_v2f64.powi(%v2f64 %a, i32 %b) {
264264
; CHECK: pow
265265
%1 = call %v2f64 @llvm.powi.v2f64(%v2f64 %a, i32 %b)
266266
ret %v2f64 %1
267267
}
268-
; CHECK: test_v2f64.sin:
268+
; CHECK-LABEL: test_v2f64.sin:{{.*}}
269269
define %v2f64 @test_v2f64.sin(%v2f64 %a) {
270270
; CHECK: sin
271271
%1 = call %v2f64 @llvm.sin.v2f64(%v2f64 %a)
272272
ret %v2f64 %1
273273
}
274-
; CHECK: test_v2f64.cos:
274+
; CHECK-LABEL: test_v2f64.cos:{{.*}}
275275
define %v2f64 @test_v2f64.cos(%v2f64 %a) {
276276
; CHECK: cos
277277
%1 = call %v2f64 @llvm.cos.v2f64(%v2f64 %a)
278278
ret %v2f64 %1
279279
}
280-
; CHECK: test_v2f64.pow:
280+
; CHECK-LABEL: test_v2f64.pow:{{.*}}
281281
define %v2f64 @test_v2f64.pow(%v2f64 %a, %v2f64 %b) {
282282
; CHECK: pow
283283
%1 = call %v2f64 @llvm.pow.v2f64(%v2f64 %a, %v2f64 %b)
284284
ret %v2f64 %1
285285
}
286-
; CHECK: test_v2f64.exp:
286+
; CHECK-LABEL: test_v2f64.exp:{{.*}}
287287
define %v2f64 @test_v2f64.exp(%v2f64 %a) {
288288
; CHECK: exp
289289
%1 = call %v2f64 @llvm.exp.v2f64(%v2f64 %a)
290290
ret %v2f64 %1
291291
}
292-
; CHECK: test_v2f64.exp2:
292+
; CHECK-LABEL: test_v2f64.exp2:{{.*}}
293293
define %v2f64 @test_v2f64.exp2(%v2f64 %a) {
294294
; CHECK: exp
295295
%1 = call %v2f64 @llvm.exp2.v2f64(%v2f64 %a)
296296
ret %v2f64 %1
297297
}
298-
; CHECK: test_v2f64.log:
298+
; CHECK-LABEL: test_v2f64.log:{{.*}}
299299
define %v2f64 @test_v2f64.log(%v2f64 %a) {
300300
; CHECK: log
301301
%1 = call %v2f64 @llvm.log.v2f64(%v2f64 %a)
302302
ret %v2f64 %1
303303
}
304-
; CHECK: test_v2f64.log10:
304+
; CHECK-LABEL: test_v2f64.log10:{{.*}}
305305
define %v2f64 @test_v2f64.log10(%v2f64 %a) {
306306
; CHECK: log
307307
%1 = call %v2f64 @llvm.log10.v2f64(%v2f64 %a)
308308
ret %v2f64 %1
309309
}
310-
; CHECK: test_v2f64.log2:
310+
; CHECK-LABEL: test_v2f64.log2:{{.*}}
311311
define %v2f64 @test_v2f64.log2(%v2f64 %a) {
312312
; CHECK: log
313313
%1 = call %v2f64 @llvm.log2.v2f64(%v2f64 %a)
314314
ret %v2f64 %1
315315
}
316-
; CHECK: test_v2f64.fma:
316+
; CHECK-LABEL: test_v2f64.fma:{{.*}}
317317
define %v2f64 @test_v2f64.fma(%v2f64 %a, %v2f64 %b, %v2f64 %c) {
318318
; CHECK: fma
319319
%1 = call %v2f64 @llvm.fma.v2f64(%v2f64 %a, %v2f64 %b, %v2f64 %c)
320320
ret %v2f64 %1
321321
}
322-
; CHECK: test_v2f64.fabs:
322+
; CHECK-LABEL: test_v2f64.fabs:{{.*}}
323323
define %v2f64 @test_v2f64.fabs(%v2f64 %a) {
324-
; CHECK: fabs
324+
; CHECK: bfc {{r[1,3]}}, #31, #1
325+
; CHECK: bfc {{r[1,3]}}, #31, #1
325326
%1 = call %v2f64 @llvm.fabs.v2f64(%v2f64 %a)
326327
ret %v2f64 %1
327328
}
328-
; CHECK: test_v2f64.floor:
329+
; CHECK-LABEL: test_v2f64.floor:{{.*}}
329330
define %v2f64 @test_v2f64.floor(%v2f64 %a) {
330331
; CHECK: floor
331332
%1 = call %v2f64 @llvm.floor.v2f64(%v2f64 %a)
332333
ret %v2f64 %1
333334
}
334-
; CHECK: test_v2f64.fceil:
335+
; CHECK-LABEL: test_v2f64.fceil:{{.*}}
335336
define %v2f64 @test_v2f64.fceil(%v2f64 %a) {
336337
; CHECK: ceil
337338
%1 = call %v2f64 @llvm.fceil.v2f64(%v2f64 %a)
338339
ret %v2f64 %1
339340
}
340-
; CHECK: test_v2f64.trunc:
341+
; CHECK-LABEL: test_v2f64.trunc:{{.*}}
341342
define %v2f64 @test_v2f64.trunc(%v2f64 %a) {
342343
; CHECK: trunc
343344
%1 = call %v2f64 @llvm.trunc.v2f64(%v2f64 %a)
344345
ret %v2f64 %1
345346
}
346-
; CHECK: test_v2f64.rint:
347+
; CHECK-LABEL: test_v2f64.rint:{{.*}}
347348
define %v2f64 @test_v2f64.rint(%v2f64 %a) {
348349
; CHECK: rint
349350
%1 = call %v2f64 @llvm.rint.v2f64(%v2f64 %a)
350351
ret %v2f64 %1
351352
}
352-
; CHECK: test_v2f64.nearbyint:
353+
; CHECK-LABEL: test_v2f64.nearbyint:{{.*}}
353354
define %v2f64 @test_v2f64.nearbyint(%v2f64 %a) {
354355
; CHECK: nearbyint
355356
%1 = call %v2f64 @llvm.nearbyint.v2f64(%v2f64 %a)

0 commit comments

Comments
 (0)
Please sign in to comment.