1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=sandybridge | FileCheck %s
4 define void @PR50609(ptr noalias nocapture %RET, ptr noalias %aFOO, <16 x i32> %__mask) nounwind {
5 ; CHECK-LABEL: PR50609:
6 ; CHECK: # %bb.0: # %allocas
7 ; CHECK-NEXT: leal 40(%rsi), %eax
8 ; CHECK-NEXT: vmovq %rsi, %xmm2
9 ; CHECK-NEXT: vmovd %eax, %xmm3
10 ; CHECK-NEXT: vpsubq %xmm2, %xmm3, %xmm2
11 ; CHECK-NEXT: vpsrad $31, %xmm2, %xmm3
12 ; CHECK-NEXT: vpsrld $30, %xmm3, %xmm3
13 ; CHECK-NEXT: vpaddd %xmm3, %xmm2, %xmm2
14 ; CHECK-NEXT: vpsrad $2, %xmm2, %xmm2
15 ; CHECK-NEXT: vcvtdq2ps %ymm2, %ymm2
16 ; CHECK-NEXT: vshufps {{.*#+}} xmm2 = xmm2[0,0,0,0]
17 ; CHECK-NEXT: vinsertf128 $1, %xmm2, %ymm2, %ymm2
18 ; CHECK-NEXT: vmaskmovps %ymm2, %ymm0, (%rdi)
19 ; CHECK-NEXT: vmaskmovps %ymm2, %ymm1, 32(%rdi)
20 ; CHECK-NEXT: vzeroupper
23 %aFOO_load_ptr2int = ptrtoint ptr %aFOO to i64
24 %aFOO_load_ptr2int_broadcast = insertelement <16 x i64> undef, i64 %aFOO_load_ptr2int, i32 0
25 %aFOO_load4_offset = getelementptr float, ptr %aFOO, i64 10
26 %c_load_ptr2int = ptrtoint ptr %aFOO_load4_offset to i64
27 %c_load_ptr2int_broadcast = insertelement <16 x i64> undef, i64 %c_load_ptr2int, i32 0
28 %0 = sub <16 x i64> %c_load_ptr2int_broadcast, %aFOO_load_ptr2int_broadcast
29 %1 = trunc <16 x i64> %0 to <16 x i32>
30 %2 = sdiv <16 x i32> %1, <i32 4, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1>
31 %3 = sitofp <16 x i32> %2 to <16 x float>
32 %val0.i.i = shufflevector <16 x float> %3, <16 x float> undef, <8 x i32> zeroinitializer
33 %mask0.i.i = shufflevector <16 x i32> %__mask, <16 x i32> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
34 %mask1.i.i = shufflevector <16 x i32> %__mask, <16 x i32> undef, <8 x i32> <i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
35 call void @llvm.x86.avx.maskstore.ps.256(ptr %RET, <8 x i32> %mask0.i.i, <8 x float> %val0.i.i) #1
36 %ptr1.i.i16 = getelementptr float, ptr %RET, i64 8
37 call void @llvm.x86.avx.maskstore.ps.256(ptr %ptr1.i.i16, <8 x i32> %mask1.i.i, <8 x float> %val0.i.i) #1
40 declare void @llvm.x86.avx.maskstore.ps.256(ptr, <8 x i32>, <8 x float>)