1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc < %s -mtriple=i386-unknown -mattr=+sse2,-sse4.1 | FileCheck %s
3
4define void @test(<8 x i16>* %b, i16 %a0, i16 %a1, i16 %a2, i16 %a3, i16 %a4, i16 %a5, i16 %a6, i16 %a7) nounwind {
5; CHECK-LABEL: test:
6; CHECK:       # BB#0:
7; CHECK-NEXT:    movl {{[0-9]+}}(%esp), %eax
8; CHECK-NEXT:    movd {{.*#+}} xmm0 = mem[0],zero,zero,zero
9; CHECK-NEXT:    movd {{.*#+}} xmm1 = mem[0],zero,zero,zero
10; CHECK-NEXT:    punpcklwd {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3]
11; CHECK-NEXT:    movd {{.*#+}} xmm0 = mem[0],zero,zero,zero
12; CHECK-NEXT:    movd {{.*#+}} xmm2 = mem[0],zero,zero,zero
13; CHECK-NEXT:    punpcklwd {{.*#+}} xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1],xmm2[2],xmm0[2],xmm2[3],xmm0[3]
14; CHECK-NEXT:    punpcklwd {{.*#+}} xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1],xmm2[2],xmm1[2],xmm2[3],xmm1[3]
15; CHECK-NEXT:    movd {{.*#+}} xmm0 = mem[0],zero,zero,zero
16; CHECK-NEXT:    movd {{.*#+}} xmm1 = mem[0],zero,zero,zero
17; CHECK-NEXT:    punpcklwd {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3]
18; CHECK-NEXT:    movd {{.*#+}} xmm0 = mem[0],zero,zero,zero
19; CHECK-NEXT:    movd {{.*#+}} xmm3 = mem[0],zero,zero,zero
20; CHECK-NEXT:    punpcklwd {{.*#+}} xmm3 = xmm3[0],xmm0[0],xmm3[1],xmm0[1],xmm3[2],xmm0[2],xmm3[3],xmm0[3]
21; CHECK-NEXT:    punpcklwd {{.*#+}} xmm3 = xmm3[0],xmm1[0],xmm3[1],xmm1[1],xmm3[2],xmm1[2],xmm3[3],xmm1[3]
22; CHECK-NEXT:    punpcklwd {{.*#+}} xmm3 = xmm3[0],xmm2[0],xmm3[1],xmm2[1],xmm3[2],xmm2[2],xmm3[3],xmm2[3]
23; CHECK-NEXT:    movdqa %xmm3, (%eax)
24; CHECK-NEXT:    retl
25  %tmp = insertelement <8 x i16> zeroinitializer, i16 %a0, i32 0
26  %tmp2 = insertelement <8 x i16> %tmp, i16 %a1, i32 1
27  %tmp4 = insertelement <8 x i16> %tmp2, i16 %a2, i32 2
28  %tmp6 = insertelement <8 x i16> %tmp4, i16 %a3, i32 3
29  %tmp8 = insertelement <8 x i16> %tmp6, i16 %a4, i32 4
30  %tmp10 = insertelement <8 x i16> %tmp8, i16 %a5, i32 5
31  %tmp12 = insertelement <8 x i16> %tmp10, i16 %a6, i32 6
32  %tmp14 = insertelement <8 x i16> %tmp12, i16 %a7, i32 7
33  store <8 x i16> %tmp14, <8 x i16>* %b
34  ret void
35}
36
37