1 ; RUN: llc < %s -march=x86 -mattr=+sse2 -disable-mmx | FileCheck %s
3 ; When loading the shift amount from memory, avoid generating the splat.
5 define void @shift5a(<4 x i32> %val, <4 x i32>* %dst, i32* %pamt) nounwind {
10 %amt = load i32* %pamt
11 %tmp0 = insertelement <4 x i32> undef, i32 %amt, i32 0
12 %shamt = shufflevector <4 x i32> %tmp0, <4 x i32> undef, <4 x i32> zeroinitializer
13 %shl = shl <4 x i32> %val, %shamt
14 store <4 x i32> %shl, <4 x i32>* %dst
19 define void @shift5b(<4 x i32> %val, <4 x i32>* %dst, i32* %pamt) nounwind {
24 %amt = load i32* %pamt
25 %tmp0 = insertelement <4 x i32> undef, i32 %amt, i32 0
26 %shamt = shufflevector <4 x i32> %tmp0, <4 x i32> undef, <4 x i32> zeroinitializer
27 %shr = ashr <4 x i32> %val, %shamt
28 store <4 x i32> %shr, <4 x i32>* %dst
33 define void @shift5c(<4 x i32> %val, <4 x i32>* %dst, i32 %amt) nounwind {
38 %tmp0 = insertelement <4 x i32> undef, i32 %amt, i32 0
39 %shamt = shufflevector <4 x i32> %tmp0, <4 x i32> undef, <4 x i32> zeroinitializer
40 %shl = shl <4 x i32> %val, %shamt
41 store <4 x i32> %shl, <4 x i32>* %dst
46 define void @shift5d(<4 x i32> %val, <4 x i32>* %dst, i32 %amt) nounwind {
51 %tmp0 = insertelement <4 x i32> undef, i32 %amt, i32 0
52 %shamt = shufflevector <4 x i32> %tmp0, <4 x i32> undef, <4 x i32> zeroinitializer
53 %shr = ashr <4 x i32> %val, %shamt
54 store <4 x i32> %shr, <4 x i32>* %dst