[llvm] r275878 - [X86][SSE] Regenerate extraction from promotion test

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 18 11:53:15 PDT 2016


Author: rksimon
Date: Mon Jul 18 13:53:15 2016
New Revision: 275878

URL: http://llvm.org/viewvc/llvm-project?rev=275878&view=rev
Log:
[X86][SSE] Regenerate extraction from promotion test

Added tests for SSE2 as well as SSE41

Modified:
    llvm/trunk/test/CodeGen/X86/2011-12-8-bitcastintprom.ll

Modified: llvm/trunk/test/CodeGen/X86/2011-12-8-bitcastintprom.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2011-12-8-bitcastintprom.ll?rev=275878&r1=275877&r2=275878&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/2011-12-8-bitcastintprom.ll (original)
+++ llvm/trunk/test/CodeGen/X86/2011-12-8-bitcastintprom.ll Mon Jul 18 13:53:15 2016
@@ -1,12 +1,27 @@
-; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7 | FileCheck %s
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+sse2 | FileCheck %s --check-prefix=CHECK --check-prefix=SSE2
+; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+sse4.1 | FileCheck %s --check-prefix=CHECK --check-prefix=SSE41
 
 ; Make sure that the conversion between v4i8 to v2i16 is not a simple bitcast.
-; CHECK: prom_bug
-; CHECK: shufb
-; CHECK: movd
-; CHECK: movw
-; CHECK: ret
 define void @prom_bug(<4 x i8> %t, i16* %p) {
+; SSE2-LABEL: prom_bug:
+; SSE2:       ## BB#0:
+; SSE2-NEXT:    pand {{.*}}(%rip), %xmm0
+; SSE2-NEXT:    packuswb %xmm0, %xmm0
+; SSE2-NEXT:    packuswb %xmm0, %xmm0
+; SSE2-NEXT:    pshufd {{.*#+}} xmm0 = xmm0[0,1,0,3]
+; SSE2-NEXT:    pshufhw {{.*#+}} xmm0 = xmm0[0,1,2,3,5,5,6,7]
+; SSE2-NEXT:    movd %xmm0, %eax
+; SSE2-NEXT:    movw %ax, (%rdi)
+; SSE2-NEXT:    retq
+;
+; SSE41-LABEL: prom_bug:
+; SSE41:       ## BB#0:
+; SSE41-NEXT:    pshufb {{.*#+}} xmm0 = xmm0[0,4,8,12,u,u,u,u,u,u,u,u,u,u,u,u]
+; SSE41-NEXT:    pmovzxwq {{.*#+}} xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero
+; SSE41-NEXT:    movd %xmm0, %eax
+; SSE41-NEXT:    movw %ax, (%rdi)
+; SSE41-NEXT:    retq
   %r = bitcast <4 x i8> %t to <2 x i16>
   %o = extractelement <2 x i16> %r, i32 0
   store i16 %o, i16* %p




More information about the llvm-commits mailing list