[X86][MMX] Regenerated vector insertion test.
[oota-llvm.git] / test / CodeGen / X86 / vec_insert-7.ll
1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -march=x86 -mattr=+mmx,+sse4.2 -mtriple=i686-apple-darwin9 | FileCheck %s
3
4 ; MMX insertelement is not available; these are promoted to XMM.
5 ; (Without SSE they are split to two ints, and the code is much better.)
6
7 define x86_mmx @mmx_movzl(x86_mmx %x) nounwind {
8 ; CHECK-LABEL: mmx_movzl:
9 ; CHECK:       ## BB#0:
10 ; CHECK-NEXT:    subl $20, %esp
11 ; CHECK-NEXT:    movq %mm0, {{[0-9]+}}(%esp)
12 ; CHECK-NEXT:    pmovzxdq {{.*#+}} xmm0 = mem[0],zero,mem[1],zero
13 ; CHECK-NEXT:    movl $32, %eax
14 ; CHECK-NEXT:    pinsrd $0, %eax, %xmm0
15 ; CHECK-NEXT:    xorl %eax, %eax
16 ; CHECK-NEXT:    pinsrd $1, %eax, %xmm0
17 ; CHECK-NEXT:    pinsrd $2, %eax, %xmm0
18 ; CHECK-NEXT:    pinsrd $3, %eax, %xmm0
19 ; CHECK-NEXT:    pshufd {{.*#+}} xmm0 = xmm0[0,2,2,3]
20 ; CHECK-NEXT:    movq %xmm0, (%esp)
21 ; CHECK-NEXT:    movq (%esp), %mm0
22 ; CHECK-NEXT:    addl $20, %esp
23 ; CHECK-NEXT:    retl
24   %tmp = bitcast x86_mmx %x to <2 x i32>
25   %tmp3 = insertelement <2 x i32> %tmp, i32 32, i32 0           ; <<2 x i32>> [#uses=1]
26   %tmp8 = insertelement <2 x i32> %tmp3, i32 0, i32 1           ; <<2 x i32>> [#uses=1]
27   %tmp9 = bitcast <2 x i32> %tmp8 to x86_mmx
28   ret x86_mmx %tmp9
29 }