llvm.org GIT mirror llvm / 748b49e
[InstCombine] add tests for binop undef-into-constant propagation; NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@343714 91177308-0d34-0410-b5e6-96231b3b80d8 Sanjay Patel 1 year, 9 months ago
1 changed file(s) with 312 addition(s) and 14 deletion(s). Raw diff Collapse all Expand all
33
44 define i32 @test2(float %f) {
55 ; CHECK-LABEL: @test2(
6 ; CHECK-NEXT: [[TMP5:%.*]] = fmul float %f, %f
6 ; CHECK-NEXT: [[TMP5:%.*]] = fmul float [[F:%.*]], [[F]]
77 ; CHECK-NEXT: [[TMP21:%.*]] = bitcast float [[TMP5]] to i32
88 ; CHECK-NEXT: ret i32 [[TMP21]]
99 ;
2121 ; CHECK-LABEL: @get_image(
2222 ; CHECK-NEXT: entry:
2323 ; CHECK-NEXT: [[TMP0:%.*]] = call i32 @fgetc(i8* null) #0
24 ; CHECK-NEXT: br i1 false, label %bb2, label %bb3
24 ; CHECK-NEXT: br i1 false, label [[BB2:%.*]], label [[BB3:%.*]]
2525 ; CHECK: bb2:
26 ; CHECK-NEXT: br label %bb3
26 ; CHECK-NEXT: br label [[BB3]]
2727 ; CHECK: bb3:
2828 ; CHECK-NEXT: unreachable
2929 ;
4646 define void @vac(<4 x float>* nocapture %a) nounwind {
4747 ; CHECK-LABEL: @vac(
4848 ; CHECK-NEXT: entry:
49 ; CHECK-NEXT: store <4 x float> zeroinitializer, <4 x float>* %a, align 16
49 ; CHECK-NEXT: store <4 x float> zeroinitializer, <4 x float>* [[A:%.*]], align 16
5050 ; CHECK-NEXT: ret void
5151 ;
5252 entry:
6363
6464 define <4 x float> @dead_shuffle_elt(<4 x float> %x, <2 x float> %y) nounwind {
6565 ; CHECK-LABEL: @dead_shuffle_elt(
66 ; CHECK-NEXT: [[SHUFFLE_I:%.*]] = shufflevector <2 x float> %y, <2 x float> undef, <4 x i32>
67 ; CHECK-NEXT: [[SHUFFLE9_I:%.*]] = shufflevector <4 x float> %x, <4 x float> [[SHUFFLE_I]], <4 x i32> >
66 ; CHECK-NEXT: [[SHUFFLE_I:%.*]] = shufflevector <2 x float> [[Y:%.*]], <2 x float> undef, <4 x i32> >
67 ; CHECK-NEXT: [[SHUFFLE9_I:%.*]] = shufflevector <4 x float> [[X:%.*]], <4 x float> [[SHUFFLE_I]], <4 x i32>
6868 ; CHECK-NEXT: ret <4 x float> [[SHUFFLE9_I]]
6969 ;
7070 %shuffle.i = shufflevector <2 x float> %y, <2 x float> %y, <4 x i32>
7474
7575 define <2 x float> @test_fptrunc(double %f) {
7676 ; CHECK-LABEL: @test_fptrunc(
77 ; CHECK-NEXT: [[TMP1:%.*]] = insertelement <2 x double> , double %f, i32 0
77 ; CHECK-NEXT: [[TMP1:%.*]] = insertelement <2 x double> , double [[F:%.*]], i32 0
7878 ; CHECK-NEXT: [[TMP2:%.*]] = fptrunc <2 x double> [[TMP1]] to <2 x float>
7979 ; CHECK-NEXT: ret <2 x float> [[TMP2]]
8080 ;
8989
9090 define <2 x double> @test_fpext(float %f) {
9191 ; CHECK-LABEL: @test_fpext(
92 ; CHECK-NEXT: [[TMP1:%.*]] = insertelement <2 x float> , float %f, i32 0
92 ; CHECK-NEXT: [[TMP1:%.*]] = insertelement <2 x float> , float [[F:%.*]], i32 0
9393 ; CHECK-NEXT: [[TMP2:%.*]] = fpext <2 x float> [[TMP1]] to <2 x double>
9494 ; CHECK-NEXT: ret <2 x double> [[TMP2]]
9595 ;
104104
105105 define <4 x double> @test_shuffle(<4 x double> %f) {
106106 ; CHECK-LABEL: @test_shuffle(
107 ; CHECK-NEXT: [[RET1:%.*]] = insertelement <4 x double> %f, double 1.000000e+00, i32 3
107 ; CHECK-NEXT: [[RET1:%.*]] = insertelement <4 x double> [[F:%.*]], double 1.000000e+00, i32 3
108108 ; CHECK-NEXT: ret <4 x double> [[RET1]]
109109 ;
110110 %ret = shufflevector <4 x double> %f, <4 x double> , <4 x i32>
113113
114114 define <4 x float> @test_select(float %f, float %g) {
115115 ; CHECK-LABEL: @test_select(
116 ; CHECK-NEXT: [[A3:%.*]] = insertelement <4 x float> , float %f, i32 0
116 ; CHECK-NEXT: [[A3:%.*]] = insertelement <4 x float> , float [[F:%.*]], i32 0
117117 ; CHECK-NEXT: [[RET:%.*]] = shufflevector <4 x float> [[A3]], <4 x float> , <4 x i32>
118118 ; CHECK-NEXT: ret <4 x float> [[RET]]
119119 ;
133133
134134 define <2 x i64> @PR24922(<2 x i64> %v) {
135135 ; CHECK-LABEL: @PR24922(
136 ; CHECK-NEXT: [[RESULT1:%.*]] = insertelement <2 x i64> %v, i64 0, i32 0
136 ; CHECK-NEXT: [[RESULT1:%.*]] = insertelement <2 x i64> [[V:%.*]], i64 0, i32 0
137137 ; CHECK-NEXT: ret <2 x i64> [[RESULT1]]
138138 ;
139139 %result = select <2 x i1> bitcast (<4 x i32> to <2 x i64>), i64 0), i64 0), i1 true>, <2 x i64> %v, <2 x i64> zeroinitializer
171171
172172 define <4 x i32> @inselt_shuf_no_demand_multiuse(i32 %a0, i32 %a1, <4 x i32> %b) {
173173 ; CHECK-LABEL: @inselt_shuf_no_demand_multiuse(
174 ; CHECK-NEXT: [[OUT0:%.*]] = insertelement <4 x i32> undef, i32 %a0, i32 0
175 ; CHECK-NEXT: [[OUT01:%.*]] = insertelement <4 x i32> [[OUT0]], i32 %a1, i32 1
176 ; CHECK-NEXT: [[FOO:%.*]] = add <4 x i32> [[OUT01]], %b
174 ; CHECK-NEXT: [[OUT0:%.*]] = insertelement <4 x i32> undef, i32 [[A0:%.*]], i32 0
175 ; CHECK-NEXT: [[OUT01:%.*]] = insertelement <4 x i32> [[OUT0]], i32 [[A1:%.*]], i32 1
176 ; CHECK-NEXT: [[FOO:%.*]] = add <4 x i32> [[OUT01]], [[B:%.*]]
177177 ; CHECK-NEXT: ret <4 x i32> [[FOO]]
178178 ;
179179 %out0 = insertelement <4 x i32> undef, i32 %a0, i32 0
197197 ret <4 x float> %shuffle
198198 }
199199
200 ; Test undef replacement in constant vector elements with binops.
201
202 define <3 x i8> @shuf_add(<3 x i8> %x) {
203 ; CHECK-LABEL: @shuf_add(
204 ; CHECK-NEXT: [[BO:%.*]] = add nsw <3 x i8> [[X:%.*]],
205 ; CHECK-NEXT: [[R:%.*]] = shufflevector <3 x i8> [[BO]], <3 x i8> undef, <3 x i32>
206 ; CHECK-NEXT: ret <3 x i8> [[R]]
207 ;
208 %bo = add nsw <3 x i8> %x,
209 %r = shufflevector <3 x i8> %bo, <3 x i8> undef, <3 x i32>
210 ret <3 x i8> %r
211 }
212
213 define <3 x i8> @shuf_sub(<3 x i8> %x) {
214 ; CHECK-LABEL: @shuf_sub(
215 ; CHECK-NEXT: [[BO:%.*]] = sub nuw <3 x i8> , [[X:%.*]]
216 ; CHECK-NEXT: ret <3 x i8> [[BO]]
217 ;
218 %bo = sub nuw <3 x i8> , %x
219 %r = shufflevector <3 x i8> %bo, <3 x i8> undef, <3 x i32>
220 ret <3 x i8> %r
221 }
222
223 define <3 x i8> @shuf_mul(<3 x i8> %x) {
224 ; CHECK-LABEL: @shuf_mul(
225 ; CHECK-NEXT: [[BO:%.*]] = mul nsw <3 x i8> [[X:%.*]],
226 ; CHECK-NEXT: [[R:%.*]] = shufflevector <3 x i8> [[BO]], <3 x i8> undef, <3 x i32>
227 ; CHECK-NEXT: ret <3 x i8> [[R]]
228 ;
229 %bo = mul nsw <3 x i8> %x,
230 %r = shufflevector <3 x i8> %bo, <3 x i8> undef, <3 x i32>
231 ret <3 x i8> %r
232 }
233
234 define <3 x i8> @shuf_and(<3 x i8> %x) {
235 ; CHECK-LABEL: @shuf_and(
236 ; CHECK-NEXT: [[BO:%.*]] = and <3 x i8> [[X:%.*]],
237 ; CHECK-NEXT: [[R:%.*]] = shufflevector <3 x i8> [[BO]], <3 x i8> undef, <3 x i32>
238 ; CHECK-NEXT: ret <3 x i8> [[R]]
239 ;
240 %bo = and <3 x i8> %x,
241 %r = shufflevector <3 x i8> %bo, <3 x i8> undef, <3 x i32>
242 ret <3 x i8> %r
243 }
244
245 define <3 x i8> @shuf_or(<3 x i8> %x) {
246 ; CHECK-LABEL: @shuf_or(
247 ; CHECK-NEXT: [[BO:%.*]] = or <3 x i8> [[X:%.*]],
248 ; CHECK-NEXT: [[R:%.*]] = shufflevector <3 x i8> [[BO]], <3 x i8> undef, <3 x i32>
249 ; CHECK-NEXT: ret <3 x i8> [[R]]
250 ;
251 %bo = or <3 x i8> %x,
252 %r = shufflevector <3 x i8> %bo, <3 x i8> undef, <3 x i32>
253 ret <3 x i8> %r
254 }
255
256 define <3 x i8> @shuf_xor(<3 x i8> %x) {
257 ; CHECK-LABEL: @shuf_xor(
258 ; CHECK-NEXT: [[BO:%.*]] = xor <3 x i8> [[X:%.*]],
259 ; CHECK-NEXT: [[R:%.*]] = shufflevector <3 x i8> [[BO]], <3 x i8> undef, <3 x i32>
260 ; CHECK-NEXT: ret <3 x i8> [[R]]
261 ;
262 %bo = xor <3 x i8> %x,
263 %r = shufflevector <3 x i8> %bo, <3 x i8> undef, <3 x i32>
264 ret <3 x i8> %r
265 }
266
267 define <3 x i8> @shuf_lshr_const_op0(<3 x i8> %x) {
268 ; CHECK-LABEL: @shuf_lshr_const_op0(
269 ; CHECK-NEXT: [[BO:%.*]] = lshr <3 x i8> , [[X:%.*]]
270 ; CHECK-NEXT: [[R:%.*]] = shufflevector <3 x i8> [[BO]], <3 x i8> undef, <3 x i32>
271 ; CHECK-NEXT: ret <3 x i8> [[R]]
272 ;
273 %bo = lshr <3 x i8> , %x
274 %r = shufflevector <3 x i8> %bo, <3 x i8> undef, <3 x i32>
275 ret <3 x i8> %r
276 }
277
278 define <3 x i8> @shuf_lshr_const_op1(<3 x i8> %x) {
279 ; CHECK-LABEL: @shuf_lshr_const_op1(
280 ; CHECK-NEXT: [[BO:%.*]] = lshr exact <3 x i8> [[X:%.*]],
281 ; CHECK-NEXT: [[R:%.*]] = shufflevector <3 x i8> [[BO]], <3 x i8> undef, <3 x i32>
282 ; CHECK-NEXT: ret <3 x i8> [[R]]
283 ;
284 %bo = lshr exact <3 x i8> %x,
285 %r = shufflevector <3 x i8> %bo, <3 x i8> undef, <3 x i32>
286 ret <3 x i8> %r
287 }
288
289 define <3 x i8> @shuf_ashr_const_op0(<3 x i8> %x) {
290 ; CHECK-LABEL: @shuf_ashr_const_op0(
291 ; CHECK-NEXT: [[BO:%.*]] = lshr <3 x i8> , [[X:%.*]]
292 ; CHECK-NEXT: [[R:%.*]] = shufflevector <3 x i8> [[BO]], <3 x i8> undef, <3 x i32>
293 ; CHECK-NEXT: ret <3 x i8> [[R]]
294 ;
295 %bo = ashr <3 x i8> , %x
296 %r = shufflevector <3 x i8> %bo, <3 x i8> undef, <3 x i32>
297 ret <3 x i8> %r
298 }
299
300 define <3 x i8> @shuf_ashr_const_op1(<3 x i8> %x) {
301 ; CHECK-LABEL: @shuf_ashr_const_op1(
302 ; CHECK-NEXT: [[BO:%.*]] = ashr exact <3 x i8> [[X:%.*]],
303 ; CHECK-NEXT: [[R:%.*]] = shufflevector <3 x i8> [[BO]], <3 x i8> undef, <3 x i32>
304 ; CHECK-NEXT: ret <3 x i8> [[R]]
305 ;
306 %bo = ashr exact <3 x i8> %x,
307 %r = shufflevector <3 x i8> %bo, <3 x i8> undef, <3 x i32>
308 ret <3 x i8> %r
309 }
310
311 define <3 x i8> @shuf_shl_const_op0(<3 x i8> %x) {
312 ; CHECK-LABEL: @shuf_shl_const_op0(
313 ; CHECK-NEXT: [[BO:%.*]] = shl nsw <3 x i8> , [[X:%.*]]
314 ; CHECK-NEXT: [[R:%.*]] = shufflevector <3 x i8> [[BO]], <3 x i8> undef, <3 x i32>
315 ; CHECK-NEXT: ret <3 x i8> [[R]]
316 ;
317 %bo = shl nsw <3 x i8> , %x
318 %r = shufflevector <3 x i8> %bo, <3 x i8> undef, <3 x i32>
319 ret <3 x i8> %r
320 }
321
322 define <3 x i8> @shuf_shl_const_op1(<3 x i8> %x) {
323 ; CHECK-LABEL: @shuf_shl_const_op1(
324 ; CHECK-NEXT: [[BO:%.*]] = shl nuw <3 x i8> [[X:%.*]],
325 ; CHECK-NEXT: [[R:%.*]] = shufflevector <3 x i8> [[BO]], <3 x i8> undef, <3 x i32>
326 ; CHECK-NEXT: ret <3 x i8> [[R]]
327 ;
328 %bo = shl nuw <3 x i8> %x,
329 %r = shufflevector <3 x i8> %bo, <3 x i8> undef, <3 x i32>
330 ret <3 x i8> %r
331 }
332
333 define <3 x i8> @shuf_sdiv_const_op0(<3 x i8> %x) {
334 ; CHECK-LABEL: @shuf_sdiv_const_op0(
335 ; CHECK-NEXT: [[BO:%.*]] = sdiv exact <3 x i8> , [[X:%.*]]
336 ; CHECK-NEXT: [[R:%.*]] = shufflevector <3 x i8> [[BO]], <3 x i8> undef, <3 x i32>
337 ; CHECK-NEXT: ret <3 x i8> [[R]]
338 ;
339 %bo = sdiv exact <3 x i8> , %x
340 %r = shufflevector <3 x i8> %bo, <3 x i8> undef, <3 x i32>
341 ret <3 x i8> %r
342 }
343
344 define <3 x i8> @shuf_sdiv_const_op1(<3 x i8> %x) {
345 ; CHECK-LABEL: @shuf_sdiv_const_op1(
346 ; CHECK-NEXT: [[BO:%.*]] = sdiv <3 x i8> [[X:%.*]],
347 ; CHECK-NEXT: [[R:%.*]] = shufflevector <3 x i8> [[BO]], <3 x i8> undef, <3 x i32>
348 ; CHECK-NEXT: ret <3 x i8> [[R]]
349 ;
350 %bo = sdiv <3 x i8> %x,
351 %r = shufflevector <3 x i8> %bo, <3 x i8> undef, <3 x i32>
352 ret <3 x i8> %r
353 }
354
355 define <3 x i8> @shuf_srem_const_op0(<3 x i8> %x) {
356 ; CHECK-LABEL: @shuf_srem_const_op0(
357 ; CHECK-NEXT: [[BO:%.*]] = srem <3 x i8> , [[X:%.*]]
358 ; CHECK-NEXT: [[R:%.*]] = shufflevector <3 x i8> [[BO]], <3 x i8> undef, <3 x i32>
359 ; CHECK-NEXT: ret <3 x i8> [[R]]
360 ;
361 %bo = srem <3 x i8> , %x
362 %r = shufflevector <3 x i8> %bo, <3 x i8> undef, <3 x i32>
363 ret <3 x i8> %r
364 }
365
366 define <3 x i8> @shuf_srem_const_op1(<3 x i8> %x) {
367 ; CHECK-LABEL: @shuf_srem_const_op1(
368 ; CHECK-NEXT: [[BO:%.*]] = srem <3 x i8> [[X:%.*]],
369 ; CHECK-NEXT: [[R:%.*]] = shufflevector <3 x i8> [[BO]], <3 x i8> undef, <3 x i32>
370 ; CHECK-NEXT: ret <3 x i8> [[R]]
371 ;
372 %bo = srem <3 x i8> %x,
373 %r = shufflevector <3 x i8> %bo, <3 x i8> undef, <3 x i32>
374 ret <3 x i8> %r
375 }
376
377 define <3 x i8> @shuf_udiv_const_op0(<3 x i8> %x) {
378 ; CHECK-LABEL: @shuf_udiv_const_op0(
379 ; CHECK-NEXT: [[BO:%.*]] = udiv exact <3 x i8> , [[X:%.*]]
380 ; CHECK-NEXT: [[R:%.*]] = shufflevector <3 x i8> [[BO]], <3 x i8> undef, <3 x i32>
381 ; CHECK-NEXT: ret <3 x i8> [[R]]
382 ;
383 %bo = udiv exact <3 x i8> , %x
384 %r = shufflevector <3 x i8> %bo, <3 x i8> undef, <3 x i32>
385 ret <3 x i8> %r
386 }
387
388 define <3 x i8> @shuf_udiv_const_op1(<3 x i8> %x) {
389 ; CHECK-LABEL: @shuf_udiv_const_op1(
390 ; CHECK-NEXT: [[BO:%.*]] = udiv <3 x i8> [[X:%.*]],
391 ; CHECK-NEXT: [[R:%.*]] = shufflevector <3 x i8> [[BO]], <3 x i8> undef, <3 x i32>
392 ; CHECK-NEXT: ret <3 x i8> [[R]]
393 ;
394 %bo = udiv <3 x i8> %x,
395 %r = shufflevector <3 x i8> %bo, <3 x i8> undef, <3 x i32>
396 ret <3 x i8> %r
397 }
398
399 define <3 x i8> @shuf_urem_const_op0(<3 x i8> %x) {
400 ; CHECK-LABEL: @shuf_urem_const_op0(
401 ; CHECK-NEXT: [[BO:%.*]] = urem <3 x i8> , [[X:%.*]]
402 ; CHECK-NEXT: [[R:%.*]] = shufflevector <3 x i8> [[BO]], <3 x i8> undef, <3 x i32>
403 ; CHECK-NEXT: ret <3 x i8> [[R]]
404 ;
405 %bo = urem <3 x i8> , %x
406 %r = shufflevector <3 x i8> %bo, <3 x i8> undef, <3 x i32>
407 ret <3 x i8> %r
408 }
409
410 define <3 x i8> @shuf_urem_const_op1(<3 x i8> %x) {
411 ; CHECK-LABEL: @shuf_urem_const_op1(
412 ; CHECK-NEXT: [[BO:%.*]] = urem <3 x i8> [[X:%.*]],
413 ; CHECK-NEXT: [[R:%.*]] = shufflevector <3 x i8> [[BO]], <3 x i8> undef, <3 x i32>
414 ; CHECK-NEXT: ret <3 x i8> [[R]]
415 ;
416 %bo = urem <3 x i8> %x,
417 %r = shufflevector <3 x i8> %bo, <3 x i8> undef, <3 x i32>
418 ret <3 x i8> %r
419 }
420
421 define <3 x float> @shuf_fadd(<3 x float> %x) {
422 ; CHECK-LABEL: @shuf_fadd(
423 ; CHECK-NEXT: [[BO:%.*]] = fadd <3 x float> [[X:%.*]],
424 ; CHECK-NEXT: [[R:%.*]] = shufflevector <3 x float> [[BO]], <3 x float> undef, <3 x i32>
425 ; CHECK-NEXT: ret <3 x float> [[R]]
426 ;
427 %bo = fadd <3 x float> %x,
428 %r = shufflevector <3 x float> %bo, <3 x float> undef, <3 x i32>
429 ret <3 x float> %r
430 }
431
432 define <3 x float> @shuf_fsub(<3 x float> %x) {
433 ; CHECK-LABEL: @shuf_fsub(
434 ; CHECK-NEXT: [[BO:%.*]] = fsub fast <3 x float> , [[X:%.*]]
435 ; CHECK-NEXT: [[R:%.*]] = shufflevector <3 x float> [[BO]], <3 x float> undef, <3 x i32>
436 ; CHECK-NEXT: ret <3 x float> [[R]]
437 ;
438 %bo = fsub fast <3 x float> , %x
439 %r = shufflevector <3 x float> %bo, <3 x float> undef, <3 x i32>
440 ret <3 x float> %r
441 }
442
443 define <3 x float> @shuf_fmul(<3 x float> %x) {
444 ; CHECK-LABEL: @shuf_fmul(
445 ; CHECK-NEXT: [[BO:%.*]] = fmul reassoc <3 x float> [[X:%.*]],
446 ; CHECK-NEXT: [[R:%.*]] = shufflevector <3 x float> [[BO]], <3 x float> undef, <3 x i32>
447 ; CHECK-NEXT: ret <3 x float> [[R]]
448 ;
449 %bo = fmul reassoc <3 x float> %x,
450 %r = shufflevector <3 x float> %bo, <3 x float> undef, <3 x i32>
451 ret <3 x float> %r
452 }
453
454 define <3 x float> @shuf_fdiv_const_op0(<3 x float> %x) {
455 ; CHECK-LABEL: @shuf_fdiv_const_op0(
456 ; CHECK-NEXT: [[BO:%.*]] = fdiv reassoc ninf <3 x float> , [[X:%.*]]
457 ; CHECK-NEXT: [[R:%.*]] = shufflevector <3 x float> [[BO]], <3 x float> undef, <3 x i32>
458 ; CHECK-NEXT: ret <3 x float> [[R]]
459 ;
460 %bo = fdiv ninf reassoc <3 x float> , %x
461 %r = shufflevector <3 x float> %bo, <3 x float> undef, <3 x i32>
462 ret <3 x float> %r
463 }
464
465 define <3 x float> @shuf_fdiv_const_op1(<3 x float> %x) {
466 ; CHECK-LABEL: @shuf_fdiv_const_op1(
467 ; CHECK-NEXT: [[BO:%.*]] = fdiv nnan ninf <3 x float> [[X:%.*]],
468 ; CHECK-NEXT: [[R:%.*]] = shufflevector <3 x float> [[BO]], <3 x float> undef, <3 x i32>
469 ; CHECK-NEXT: ret <3 x float> [[R]]
470 ;
471 %bo = fdiv ninf nnan <3 x float> %x,
472 %r = shufflevector <3 x float> %bo, <3 x float> undef, <3 x i32>
473 ret <3 x float> %r
474 }
475
476 define <3 x float> @shuf_frem_const_op0(<3 x float> %x) {
477 ; CHECK-LABEL: @shuf_frem_const_op0(
478 ; CHECK-NEXT: [[BO:%.*]] = frem nnan <3 x float> , [[X:%.*]]
479 ; CHECK-NEXT: [[R:%.*]] = shufflevector <3 x float> [[BO]], <3 x float> undef, <3 x i32>
480 ; CHECK-NEXT: ret <3 x float> [[R]]
481 ;
482 %bo = frem nnan <3 x float> , %x
483 %r = shufflevector <3 x float> %bo, <3 x float> undef, <3 x i32>
484 ret <3 x float> %r
485 }
486
487 define <3 x float> @shuf_frem_const_op1(<3 x float> %x) {
488 ; CHECK-LABEL: @shuf_frem_const_op1(
489 ; CHECK-NEXT: [[BO:%.*]] = frem reassoc ninf <3 x float> [[X:%.*]],
490 ; CHECK-NEXT: [[R:%.*]] = shufflevector <3 x float> [[BO]], <3 x float> undef, <3 x i32>
491 ; CHECK-NEXT: ret <3 x float> [[R]]
492 ;
493 %bo = frem ninf reassoc <3 x float> %x,
494 %r = shufflevector <3 x float> %bo, <3 x float> undef, <3 x i32>
495 ret <3 x float> %r
496 }
497