1 ; RUN: llc < %s -march=x86 -mattr=+sse2 -mcpu=penryn | FileCheck %s
3 define <4 x float> @test(float %a) {
5 ; CHECK: insertps $29, {{.*}}, %xmm0
9 %tmp = insertelement <4 x float> zeroinitializer, float %a, i32 1
10 %tmp5 = insertelement <4 x float> %tmp, float 0.000000e+00, i32 2
11 %tmp6 = insertelement <4 x float> %tmp5, float 0.000000e+00, i32 3
15 define <2 x i64> @test2(i32 %a) {
17 ; CHECK: movd {{.*}}, %xmm0
18 ; CHECK-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,0,1]
22 %tmp7 = insertelement <4 x i32> zeroinitializer, i32 %a, i32 2
23 %tmp9 = insertelement <4 x i32> %tmp7, i32 0, i32 3
24 %tmp10 = bitcast <4 x i32> %tmp9 to <2 x i64>
28 define <4 x float> @test3(<4 x float> %A) {
30 ; CHECK: insertps {{.*#+}} xmm0 = zero,xmm0[0],zero,zero
33 %tmp0 = extractelement <4 x float> %A, i32 0
34 %tmp1 = insertelement <4 x float> <float 0.000000e+00, float undef, float undef, float undef >, float %tmp0, i32 1
35 %tmp2 = insertelement <4 x float> %tmp1, float 0.000000e+00, i32 2