1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-pc-linux -mcpu=corei7-avx | FileCheck %s
4 define <8 x i32> @shiftInput___vyuunu(<8 x i32> %input, i32 %shiftval, <8 x i32> %__mask) nounwind {
5 ; CHECK-LABEL: shiftInput___vyuunu:
6 ; CHECK: # %bb.0: # %allocas
7 ; CHECK-NEXT: vextractf128 $1, %ymm0, %xmm1
8 ; CHECK-NEXT: vmovd {{.*#+}} xmm2 = mem[0],zero,zero,zero
9 ; CHECK-NEXT: vpsrld %xmm2, %xmm1, %xmm1
10 ; CHECK-NEXT: vpsrld %xmm2, %xmm0, %xmm0
11 ; CHECK-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
14 %smear.0 = insertelement <8 x i32> undef, i32 %shiftval, i32 0
15 %smear.1 = insertelement <8 x i32> %smear.0, i32 %shiftval, i32 1
16 %smear.2 = insertelement <8 x i32> %smear.1, i32 %shiftval, i32 2
17 %smear.3 = insertelement <8 x i32> %smear.2, i32 %shiftval, i32 3
18 %smear.4 = insertelement <8 x i32> %smear.3, i32 %shiftval, i32 4
19 %smear.5 = insertelement <8 x i32> %smear.4, i32 %shiftval, i32 5
20 %smear.6 = insertelement <8 x i32> %smear.5, i32 %shiftval, i32 6
21 %smear.7 = insertelement <8 x i32> %smear.6, i32 %shiftval, i32 7
22 %bitop = lshr <8 x i32> %input, %smear.7
26 define <8 x i32> @shiftInput___canonical(<8 x i32> %input, i32 %shiftval, <8 x i32> %__mask) nounwind {
27 ; CHECK-LABEL: shiftInput___canonical:
28 ; CHECK: # %bb.0: # %allocas
29 ; CHECK-NEXT: vbroadcastss {{[0-9]+}}(%esp), %xmm1
30 ; CHECK-NEXT: vpsrldq {{.*#+}} xmm2 = xmm1[12,13,14,15],zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero
31 ; CHECK-NEXT: vextractf128 $1, %ymm0, %xmm3
32 ; CHECK-NEXT: vpsrld %xmm2, %xmm3, %xmm4
33 ; CHECK-NEXT: vpsrlq $32, %xmm1, %xmm5
34 ; CHECK-NEXT: vpsrld %xmm5, %xmm3, %xmm6
35 ; CHECK-NEXT: vpblendw {{.*#+}} xmm4 = xmm6[0,1,2,3],xmm4[4,5,6,7]
36 ; CHECK-NEXT: vpxor %xmm6, %xmm6, %xmm6
37 ; CHECK-NEXT: vpblendw {{.*#+}} xmm6 = xmm1[0,1],xmm6[2,3,4,5,6,7]
38 ; CHECK-NEXT: vpsrld %xmm6, %xmm3, %xmm7
39 ; CHECK-NEXT: vpmovzxdq {{.*#+}} xmm1 = xmm1[0],zero,xmm1[1],zero
40 ; CHECK-NEXT: vpsrld %xmm1, %xmm3, %xmm3
41 ; CHECK-NEXT: vpblendw {{.*#+}} xmm3 = xmm3[0,1,2,3],xmm7[4,5,6,7]
42 ; CHECK-NEXT: vpblendw {{.*#+}} xmm3 = xmm3[0,1],xmm4[2,3],xmm3[4,5],xmm4[6,7]
43 ; CHECK-NEXT: vpsrld %xmm2, %xmm0, %xmm2
44 ; CHECK-NEXT: vpsrld %xmm5, %xmm0, %xmm4
45 ; CHECK-NEXT: vpsrld %xmm6, %xmm0, %xmm5
46 ; CHECK-NEXT: vpsrld %xmm1, %xmm0, %xmm0
47 ; CHECK-NEXT: vpblendw {{.*#+}} xmm1 = xmm4[0,1,2,3],xmm2[4,5,6,7]
48 ; CHECK-NEXT: vpblendw {{.*#+}} xmm0 = xmm0[0,1,2,3],xmm5[4,5,6,7]
49 ; CHECK-NEXT: vpblendw {{.*#+}} xmm0 = xmm0[0,1],xmm1[2,3],xmm0[4,5],xmm1[6,7]
50 ; CHECK-NEXT: vinsertf128 $1, %xmm3, %ymm0, %ymm0
53 %smear.0 = insertelement <8 x i32> undef, i32 %shiftval, i32 0
54 %smear.7 = shufflevector <8 x i32> %smear.0, <8 x i32> undef, <8 x i32> zeroinitializer
55 %bitop = lshr <8 x i32> %input, %smear.7
59 define <4 x i64> @shiftInput___64in32bitmode(<4 x i64> %input, i64 %shiftval, <4 x i64> %__mask) nounwind {
60 ; CHECK-LABEL: shiftInput___64in32bitmode:
61 ; CHECK: # %bb.0: # %allocas
62 ; CHECK-NEXT: vextractf128 $1, %ymm0, %xmm1
63 ; CHECK-NEXT: vmovddup {{.*#+}} xmm2 = mem[0,0]
64 ; CHECK-NEXT: vpsrlq %xmm2, %xmm1, %xmm1
65 ; CHECK-NEXT: vpsrlq %xmm2, %xmm0, %xmm0
66 ; CHECK-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
69 %smear.0 = insertelement <4 x i64> undef, i64 %shiftval, i32 0
70 %smear.7 = shufflevector <4 x i64> %smear.0, <4 x i64> undef, <4 x i32> zeroinitializer
71 %bitop = lshr <4 x i64> %input, %smear.7