[llvm] r275300 - [X86][SSE] Regenerate truncated shift test

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 13 11:50:10 PDT 2016


Author: rksimon
Date: Wed Jul 13 13:50:10 2016
New Revision: 275300

URL: http://llvm.org/viewvc/llvm-project?rev=275300&view=rev
Log:
[X86][SSE] Regenerate truncated shift test

Check SSE2 and AVX2 implementations

Modified:
    llvm/trunk/test/CodeGen/X86/reduce-trunc-shl.ll

Modified: llvm/trunk/test/CodeGen/X86/reduce-trunc-shl.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/reduce-trunc-shl.ll?rev=275300&r1=275299&r2=275300&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/reduce-trunc-shl.ll (original)
+++ llvm/trunk/test/CodeGen/X86/reduce-trunc-shl.ll Wed Jul 13 13:50:10 2016
@@ -1,11 +1,25 @@
-; RUN: llc -mtriple=x86_64-unknown-linux-gnu -mattr=+avx2 < %s | FileCheck %s
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mattr=+sse2 | FileCheck %s --check-prefix=SSE2
+; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mattr=+avx2 | FileCheck %s --check-prefix=AVX2
 
-; CHECK-LABEL: {{^}}trunc_shl_7_v4i32_v4i64:
-; CHECK: vpshufd $136, (%rsi), %ymm0
-; CHECK: vpermq	$236, %ymm0, %ymm0
-; CHECK: vpslld $7, %xmm0, %xmm0
-; CHECK: vmovdqa %xmm0, (%rdi)
 define void @trunc_shl_7_v4i32_v4i64(<4 x i32> addrspace(1)* %out, <4 x i64> addrspace(1)* %in) {
+; SSE2-LABEL: trunc_shl_7_v4i32_v4i64:
+; SSE2:       # BB#0:
+; SSE2-NEXT:    pshufd {{.*#+}} xmm0 = mem[0,2,2,3]
+; SSE2-NEXT:    pshufd {{.*#+}} xmm1 = mem[0,2,2,3]
+; SSE2-NEXT:    punpcklqdq {{.*#+}} xmm1 = xmm1[0],xmm0[0]
+; SSE2-NEXT:    pslld $7, %xmm1
+; SSE2-NEXT:    movdqa %xmm1, (%rdi)
+; SSE2-NEXT:    retq
+;
+; AVX2-LABEL: trunc_shl_7_v4i32_v4i64:
+; AVX2:       # BB#0:
+; AVX2-NEXT:    vpshufd {{.*#+}} ymm0 = mem[0,2,0,2,4,6,4,6]
+; AVX2-NEXT:    vpermq {{.*#+}} ymm0 = ymm0[0,3,2,3]
+; AVX2-NEXT:    vpslld $7, %xmm0, %xmm0
+; AVX2-NEXT:    vmovdqa %xmm0, (%rdi)
+; AVX2-NEXT:    vzeroupper
+; AVX2-NEXT:    retq
   %val = load <4 x i64>, <4 x i64> addrspace(1)* %in
   %shl = shl <4 x i64> %val, <i64 7, i64 7, i64 7, i64 7>
   %trunc = trunc <4 x i64> %shl to <4 x i32>




More information about the llvm-commits mailing list