[X86][MMX] Regenerated vector insertion test.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 3 Jan 2016 19:17:37 +0000 (19:17 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 3 Jan 2016 19:17:37 +0000 (19:17 +0000)
Shows the true horror of what is going on....

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256713 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/X86/vec_insert-7.ll

index 6d4f8287cab6bee08e9a2133e3a22878c6f95460..4f72c66ecba2e25b3ec087a2f7d69810ef4d8d5e 100644 (file)
@@ -1,15 +1,29 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
 ; RUN: llc < %s -march=x86 -mattr=+mmx,+sse4.2 -mtriple=i686-apple-darwin9 | FileCheck %s
 ; RUN: llc < %s -march=x86 -mattr=+mmx,+sse4.2 -mtriple=i686-apple-darwin9 | FileCheck %s
+
 ; MMX insertelement is not available; these are promoted to XMM.
 ; (Without SSE they are split to two ints, and the code is much better.)
 
 ; MMX insertelement is not available; these are promoted to XMM.
 ; (Without SSE they are split to two ints, and the code is much better.)
 
-define x86_mmx @mmx_movzl(x86_mmx %x) nounwind  {
-entry:
-; CHECK: mmx_movzl
-; CHECK: pinsrd
-; CHECK: pinsrd
-        %tmp = bitcast x86_mmx %x to <2 x i32> 
-       %tmp3 = insertelement <2 x i32> %tmp, i32 32, i32 0             ; <<2 x i32>> [#uses=1]
-       %tmp8 = insertelement <2 x i32> %tmp3, i32 0, i32 1             ; <<2 x i32>> [#uses=1]
-        %tmp9 = bitcast <2 x i32> %tmp8 to x86_mmx
-       ret x86_mmx %tmp9
+define x86_mmx @mmx_movzl(x86_mmx %x) nounwind {
+; CHECK-LABEL: mmx_movzl:
+; CHECK:       ## BB#0:
+; CHECK-NEXT:    subl $20, %esp
+; CHECK-NEXT:    movq %mm0, {{[0-9]+}}(%esp)
+; CHECK-NEXT:    pmovzxdq {{.*#+}} xmm0 = mem[0],zero,mem[1],zero
+; CHECK-NEXT:    movl $32, %eax
+; CHECK-NEXT:    pinsrd $0, %eax, %xmm0
+; CHECK-NEXT:    xorl %eax, %eax
+; CHECK-NEXT:    pinsrd $1, %eax, %xmm0
+; CHECK-NEXT:    pinsrd $2, %eax, %xmm0
+; CHECK-NEXT:    pinsrd $3, %eax, %xmm0
+; CHECK-NEXT:    pshufd {{.*#+}} xmm0 = xmm0[0,2,2,3]
+; CHECK-NEXT:    movq %xmm0, (%esp)
+; CHECK-NEXT:    movq (%esp), %mm0
+; CHECK-NEXT:    addl $20, %esp
+; CHECK-NEXT:    retl
+  %tmp = bitcast x86_mmx %x to <2 x i32>
+  %tmp3 = insertelement <2 x i32> %tmp, i32 32, i32 0          ; <<2 x i32>> [#uses=1]
+  %tmp8 = insertelement <2 x i32> %tmp3, i32 0, i32 1          ; <<2 x i32>> [#uses=1]
+  %tmp9 = bitcast <2 x i32> %tmp8 to x86_mmx
+  ret x86_mmx %tmp9
 }
 }