[llvm] 4aa06ba - [X86] Cleanup vector-trunc-* test prefixes
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 26 08:28:18 PDT 2023
Author: Simon Pilgrim
Date: 2023-07-26T16:27:56+01:00
New Revision: 4aa06ba39e6138b61aeeb1eb4d4f7372c5c07ff1
URL: https://github.com/llvm/llvm-project/commit/4aa06ba39e6138b61aeeb1eb4d4f7372c5c07ff1
DIFF: https://github.com/llvm/llvm-project/commit/4aa06ba39e6138b61aeeb1eb4d4f7372c5c07ff1.diff
LOG: [X86] Cleanup vector-trunc-* test prefixes
Add missing SSE2-SSSE3 common prefix to vector-trunc-ssat.ll
Added:
Modified:
llvm/test/CodeGen/X86/vector-trunc-packus.ll
llvm/test/CodeGen/X86/vector-trunc-ssat.ll
llvm/test/CodeGen/X86/vector-trunc-usat.ll
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/X86/vector-trunc-packus.ll b/llvm/test/CodeGen/X86/vector-trunc-packus.ll
index a385e3d3244e61..ec03b1f4ff4897 100644
--- a/llvm/test/CodeGen/X86/vector-trunc-packus.ll
+++ b/llvm/test/CodeGen/X86/vector-trunc-packus.ll
@@ -6,7 +6,7 @@
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx2 | FileCheck %s --check-prefixes=AVX,AVX2,AVX2-SLOW
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx2,+fast-variable-crosslane-shuffle,+fast-variable-perlane-shuffle | FileCheck %s --check-prefixes=AVX,AVX2,AVX2-FAST,AVX2-FAST-ALL
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx2,+fast-variable-perlane-shuffle | FileCheck %s --check-prefixes=AVX,AVX2,AVX2-FAST,AVX2-FAST-PERLANE
-; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512f | FileCheck %s --check-prefix=AVX512 --check-prefix=AVX512F
+; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512f | FileCheck %s --check-prefixes=AVX512,AVX512F
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512vl,+fast-variable-crosslane-shuffle,+fast-variable-perlane-shuffle | FileCheck %s --check-prefixes=AVX512,AVX512VL
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512vl,+fast-variable-perlane-shuffle | FileCheck %s --check-prefixes=AVX512,AVX512VL
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512bw,+fast-variable-crosslane-shuffle,+fast-variable-perlane-shuffle | FileCheck %s --check-prefixes=AVX512,AVX512BW
diff --git a/llvm/test/CodeGen/X86/vector-trunc-ssat.ll b/llvm/test/CodeGen/X86/vector-trunc-ssat.ll
index 0a34487b22637c..11b7a43966c75a 100644
--- a/llvm/test/CodeGen/X86/vector-trunc-ssat.ll
+++ b/llvm/test/CodeGen/X86/vector-trunc-ssat.ll
@@ -1,12 +1,12 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
-; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+sse2 | FileCheck %s --check-prefix=SSE --check-prefix=SSE2
-; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+ssse3 | FileCheck %s --check-prefix=SSE --check-prefix=SSSE3
-; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+sse4.1 | FileCheck %s --check-prefix=SSE --check-prefix=SSE41
-; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx | FileCheck %s --check-prefix=AVX --check-prefix=AVX1
+; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+sse2 | FileCheck %s --check-prefixes=SSE,SSE2-SSSE3,SSE2
+; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+ssse3 | FileCheck %s --check-prefixes=SSE,SSE2-SSSE3,SSSE3
+; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+sse4.1 | FileCheck %s --check-prefixes=SSE,SSE41
+; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx | FileCheck %s --check-prefixes=AVX,AVX1
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx2 | FileCheck %s --check-prefixes=AVX,AVX2,AVX2-SLOW
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx2,+fast-variable-crosslane-shuffle,+fast-variable-perlane-shuffle | FileCheck %s --check-prefixes=AVX,AVX2,AVX2-FAST,AVX2-FAST-ALL
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx2,+fast-variable-perlane-shuffle | FileCheck %s --check-prefixes=AVX,AVX2,AVX2-FAST,AVX2-FAST-PERLANE
-; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512f | FileCheck %s --check-prefix=AVX512 --check-prefix=AVX512F
+; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512f | FileCheck %s --check-prefixes=AVX512,AVX512F
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512vl,+fast-variable-crosslane-shuffle,+fast-variable-perlane-shuffle | FileCheck %s --check-prefixes=AVX512,AVX512VL
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512vl,+fast-variable-perlane-shuffle | FileCheck %s --check-prefixes=AVX512,AVX512VL
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512bw,+fast-variable-crosslane-shuffle,+fast-variable-perlane-shuffle | FileCheck %s --check-prefixes=AVX512,AVX512BW
@@ -20,69 +20,37 @@
;
define <2 x i32> @trunc_ssat_v2i64_v2i32(<2 x i64> %a0) {
-; SSE2-LABEL: trunc_ssat_v2i64_v2i32:
-; SSE2: # %bb.0:
-; SSE2-NEXT: movdqa {{.*#+}} xmm1 = [2147483648,2147483648]
-; SSE2-NEXT: movdqa %xmm0, %xmm2
-; SSE2-NEXT: pxor %xmm1, %xmm2
-; SSE2-NEXT: pshufd {{.*#+}} xmm3 = xmm2[1,1,3,3]
-; SSE2-NEXT: pxor %xmm4, %xmm4
-; SSE2-NEXT: pcmpeqd %xmm3, %xmm4
-; SSE2-NEXT: movdqa {{.*#+}} xmm3 = [4294967295,4294967295]
-; SSE2-NEXT: pcmpgtd %xmm2, %xmm3
-; SSE2-NEXT: pshufd {{.*#+}} xmm2 = xmm3[0,0,2,2]
-; SSE2-NEXT: pand %xmm4, %xmm2
-; SSE2-NEXT: pshufd {{.*#+}} xmm3 = xmm3[1,1,3,3]
-; SSE2-NEXT: por %xmm2, %xmm3
-; SSE2-NEXT: pand %xmm3, %xmm0
-; SSE2-NEXT: pandn {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm3
-; SSE2-NEXT: por %xmm0, %xmm3
-; SSE2-NEXT: pxor %xmm3, %xmm1
-; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm1[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm2, %xmm2
-; SSE2-NEXT: pcmpeqd %xmm0, %xmm2
-; SSE2-NEXT: pcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
-; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm1[0,0,2,2]
-; SSE2-NEXT: pand %xmm2, %xmm0
-; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[1,1,3,3]
-; SSE2-NEXT: por %xmm0, %xmm1
-; SSE2-NEXT: pand %xmm1, %xmm3
-; SSE2-NEXT: pandn {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
-; SSE2-NEXT: por %xmm3, %xmm1
-; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm1[0,2,2,3]
-; SSE2-NEXT: retq
-;
-; SSSE3-LABEL: trunc_ssat_v2i64_v2i32:
-; SSSE3: # %bb.0:
-; SSSE3-NEXT: movdqa {{.*#+}} xmm1 = [2147483648,2147483648]
-; SSSE3-NEXT: movdqa %xmm0, %xmm2
-; SSSE3-NEXT: pxor %xmm1, %xmm2
-; SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm2[1,1,3,3]
-; SSSE3-NEXT: pxor %xmm4, %xmm4
-; SSSE3-NEXT: pcmpeqd %xmm3, %xmm4
-; SSSE3-NEXT: movdqa {{.*#+}} xmm3 = [4294967295,4294967295]
-; SSSE3-NEXT: pcmpgtd %xmm2, %xmm3
-; SSSE3-NEXT: pshufd {{.*#+}} xmm2 = xmm3[0,0,2,2]
-; SSSE3-NEXT: pand %xmm4, %xmm2
-; SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm3[1,1,3,3]
-; SSSE3-NEXT: por %xmm2, %xmm3
-; SSSE3-NEXT: pand %xmm3, %xmm0
-; SSSE3-NEXT: pandn {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm3
-; SSSE3-NEXT: por %xmm0, %xmm3
-; SSSE3-NEXT: pxor %xmm3, %xmm1
-; SSSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm1[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm2, %xmm2
-; SSSE3-NEXT: pcmpeqd %xmm0, %xmm2
-; SSSE3-NEXT: pcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
-; SSSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm1[0,0,2,2]
-; SSSE3-NEXT: pand %xmm2, %xmm0
-; SSSE3-NEXT: pshufd {{.*#+}} xmm1 = xmm1[1,1,3,3]
-; SSSE3-NEXT: por %xmm0, %xmm1
-; SSSE3-NEXT: pand %xmm1, %xmm3
-; SSSE3-NEXT: pandn {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
-; SSSE3-NEXT: por %xmm3, %xmm1
-; SSSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm1[0,2,2,3]
-; SSSE3-NEXT: retq
+; SSE2-SSSE3-LABEL: trunc_ssat_v2i64_v2i32:
+; SSE2-SSSE3: # %bb.0:
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm1 = [2147483648,2147483648]
+; SSE2-SSSE3-NEXT: movdqa %xmm0, %xmm2
+; SSE2-SSSE3-NEXT: pxor %xmm1, %xmm2
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm2[1,1,3,3]
+; SSE2-SSSE3-NEXT: pxor %xmm4, %xmm4
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm3, %xmm4
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm3 = [4294967295,4294967295]
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm2, %xmm3
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm2 = xmm3[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm4, %xmm2
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm3[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm2, %xmm3
+; SSE2-SSSE3-NEXT: pand %xmm3, %xmm0
+; SSE2-SSSE3-NEXT: pandn {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm3
+; SSE2-SSSE3-NEXT: por %xmm0, %xmm3
+; SSE2-SSSE3-NEXT: pxor %xmm3, %xmm1
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm1[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm2, %xmm2
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm0, %xmm2
+; SSE2-SSSE3-NEXT: pcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm1[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm2, %xmm0
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm1 = xmm1[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm0, %xmm1
+; SSE2-SSSE3-NEXT: pand %xmm1, %xmm3
+; SSE2-SSSE3-NEXT: pandn {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
+; SSE2-SSSE3-NEXT: por %xmm3, %xmm1
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm1[0,2,2,3]
+; SSE2-SSSE3-NEXT: retq
;
; SSE41-LABEL: trunc_ssat_v2i64_v2i32:
; SSE41: # %bb.0:
@@ -174,71 +142,38 @@ define <2 x i32> @trunc_ssat_v2i64_v2i32(<2 x i64> %a0) {
}
define void @trunc_ssat_v2i64_v2i32_store(<2 x i64> %a0, ptr %p1) {
-; SSE2-LABEL: trunc_ssat_v2i64_v2i32_store:
-; SSE2: # %bb.0:
-; SSE2-NEXT: movdqa {{.*#+}} xmm1 = [2147483648,2147483648]
-; SSE2-NEXT: movdqa %xmm0, %xmm2
-; SSE2-NEXT: pxor %xmm1, %xmm2
-; SSE2-NEXT: pshufd {{.*#+}} xmm3 = xmm2[1,1,3,3]
-; SSE2-NEXT: pxor %xmm4, %xmm4
-; SSE2-NEXT: pcmpeqd %xmm3, %xmm4
-; SSE2-NEXT: movdqa {{.*#+}} xmm3 = [4294967295,4294967295]
-; SSE2-NEXT: pcmpgtd %xmm2, %xmm3
-; SSE2-NEXT: pshufd {{.*#+}} xmm2 = xmm3[0,0,2,2]
-; SSE2-NEXT: pand %xmm4, %xmm2
-; SSE2-NEXT: pshufd {{.*#+}} xmm3 = xmm3[1,1,3,3]
-; SSE2-NEXT: por %xmm2, %xmm3
-; SSE2-NEXT: pand %xmm3, %xmm0
-; SSE2-NEXT: pandn {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm3
-; SSE2-NEXT: por %xmm0, %xmm3
-; SSE2-NEXT: pxor %xmm3, %xmm1
-; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm1[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm2, %xmm2
-; SSE2-NEXT: pcmpeqd %xmm0, %xmm2
-; SSE2-NEXT: pcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
-; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm1[0,0,2,2]
-; SSE2-NEXT: pand %xmm2, %xmm0
-; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[1,1,3,3]
-; SSE2-NEXT: por %xmm0, %xmm1
-; SSE2-NEXT: pand %xmm1, %xmm3
-; SSE2-NEXT: pandn {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
-; SSE2-NEXT: por %xmm3, %xmm1
-; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm1[0,2,2,3]
-; SSE2-NEXT: movq %xmm0, (%rdi)
-; SSE2-NEXT: retq
-;
-; SSSE3-LABEL: trunc_ssat_v2i64_v2i32_store:
-; SSSE3: # %bb.0:
-; SSSE3-NEXT: movdqa {{.*#+}} xmm1 = [2147483648,2147483648]
-; SSSE3-NEXT: movdqa %xmm0, %xmm2
-; SSSE3-NEXT: pxor %xmm1, %xmm2
-; SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm2[1,1,3,3]
-; SSSE3-NEXT: pxor %xmm4, %xmm4
-; SSSE3-NEXT: pcmpeqd %xmm3, %xmm4
-; SSSE3-NEXT: movdqa {{.*#+}} xmm3 = [4294967295,4294967295]
-; SSSE3-NEXT: pcmpgtd %xmm2, %xmm3
-; SSSE3-NEXT: pshufd {{.*#+}} xmm2 = xmm3[0,0,2,2]
-; SSSE3-NEXT: pand %xmm4, %xmm2
-; SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm3[1,1,3,3]
-; SSSE3-NEXT: por %xmm2, %xmm3
-; SSSE3-NEXT: pand %xmm3, %xmm0
-; SSSE3-NEXT: pandn {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm3
-; SSSE3-NEXT: por %xmm0, %xmm3
-; SSSE3-NEXT: pxor %xmm3, %xmm1
-; SSSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm1[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm2, %xmm2
-; SSSE3-NEXT: pcmpeqd %xmm0, %xmm2
-; SSSE3-NEXT: pcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
-; SSSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm1[0,0,2,2]
-; SSSE3-NEXT: pand %xmm2, %xmm0
-; SSSE3-NEXT: pshufd {{.*#+}} xmm1 = xmm1[1,1,3,3]
-; SSSE3-NEXT: por %xmm0, %xmm1
-; SSSE3-NEXT: pand %xmm1, %xmm3
-; SSSE3-NEXT: pandn {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
-; SSSE3-NEXT: por %xmm3, %xmm1
-; SSSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm1[0,2,2,3]
-; SSSE3-NEXT: movq %xmm0, (%rdi)
-; SSSE3-NEXT: retq
+; SSE2-SSSE3-LABEL: trunc_ssat_v2i64_v2i32_store:
+; SSE2-SSSE3: # %bb.0:
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm1 = [2147483648,2147483648]
+; SSE2-SSSE3-NEXT: movdqa %xmm0, %xmm2
+; SSE2-SSSE3-NEXT: pxor %xmm1, %xmm2
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm2[1,1,3,3]
+; SSE2-SSSE3-NEXT: pxor %xmm4, %xmm4
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm3, %xmm4
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm3 = [4294967295,4294967295]
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm2, %xmm3
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm2 = xmm3[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm4, %xmm2
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm3[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm2, %xmm3
+; SSE2-SSSE3-NEXT: pand %xmm3, %xmm0
+; SSE2-SSSE3-NEXT: pandn {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm3
+; SSE2-SSSE3-NEXT: por %xmm0, %xmm3
+; SSE2-SSSE3-NEXT: pxor %xmm3, %xmm1
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm1[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm2, %xmm2
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm0, %xmm2
+; SSE2-SSSE3-NEXT: pcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm1[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm2, %xmm0
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm1 = xmm1[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm0, %xmm1
+; SSE2-SSSE3-NEXT: pand %xmm1, %xmm3
+; SSE2-SSSE3-NEXT: pandn {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
+; SSE2-SSSE3-NEXT: por %xmm3, %xmm1
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm1[0,2,2,3]
+; SSE2-SSSE3-NEXT: movq %xmm0, (%rdi)
+; SSE2-SSSE3-NEXT: retq
;
; SSE41-LABEL: trunc_ssat_v2i64_v2i32_store:
; SSE41: # %bb.0:
@@ -334,125 +269,65 @@ define void @trunc_ssat_v2i64_v2i32_store(<2 x i64> %a0, ptr %p1) {
}
define <4 x i32> @trunc_ssat_v4i64_v4i32(<4 x i64> %a0) {
-; SSE2-LABEL: trunc_ssat_v4i64_v4i32:
-; SSE2: # %bb.0:
-; SSE2-NEXT: movdqa {{.*#+}} xmm3 = [2147483647,2147483647]
-; SSE2-NEXT: movdqa {{.*#+}} xmm2 = [2147483648,2147483648]
-; SSE2-NEXT: movdqa %xmm0, %xmm4
-; SSE2-NEXT: pxor %xmm2, %xmm4
-; SSE2-NEXT: pshufd {{.*#+}} xmm5 = xmm4[1,1,3,3]
-; SSE2-NEXT: pxor %xmm6, %xmm6
-; SSE2-NEXT: pcmpeqd %xmm6, %xmm5
-; SSE2-NEXT: movdqa {{.*#+}} xmm7 = [4294967295,4294967295]
-; SSE2-NEXT: movdqa %xmm7, %xmm8
-; SSE2-NEXT: pcmpgtd %xmm4, %xmm8
-; SSE2-NEXT: pshufd {{.*#+}} xmm4 = xmm8[0,0,2,2]
-; SSE2-NEXT: pand %xmm5, %xmm4
-; SSE2-NEXT: pshufd {{.*#+}} xmm5 = xmm8[1,1,3,3]
-; SSE2-NEXT: por %xmm4, %xmm5
-; SSE2-NEXT: pand %xmm5, %xmm0
-; SSE2-NEXT: pandn %xmm3, %xmm5
-; SSE2-NEXT: por %xmm5, %xmm0
-; SSE2-NEXT: movdqa %xmm1, %xmm4
-; SSE2-NEXT: pxor %xmm2, %xmm4
-; SSE2-NEXT: pshufd {{.*#+}} xmm5 = xmm4[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm6, %xmm5
-; SSE2-NEXT: pcmpgtd %xmm4, %xmm7
-; SSE2-NEXT: pshufd {{.*#+}} xmm4 = xmm7[0,0,2,2]
-; SSE2-NEXT: pand %xmm5, %xmm4
-; SSE2-NEXT: pshufd {{.*#+}} xmm5 = xmm7[1,1,3,3]
-; SSE2-NEXT: por %xmm4, %xmm5
-; SSE2-NEXT: pand %xmm5, %xmm1
-; SSE2-NEXT: pandn %xmm3, %xmm5
-; SSE2-NEXT: por %xmm1, %xmm5
-; SSE2-NEXT: movdqa {{.*#+}} xmm1 = [18446744071562067968,18446744071562067968]
-; SSE2-NEXT: movdqa %xmm5, %xmm3
-; SSE2-NEXT: pxor %xmm2, %xmm3
-; SSE2-NEXT: pshufd {{.*#+}} xmm4 = xmm3[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm6, %xmm6
-; SSE2-NEXT: pcmpeqd %xmm6, %xmm4
-; SSE2-NEXT: movdqa {{.*#+}} xmm7 = [18446744069414584320,18446744069414584320]
-; SSE2-NEXT: pcmpgtd %xmm7, %xmm3
-; SSE2-NEXT: pshufd {{.*#+}} xmm8 = xmm3[0,0,2,2]
-; SSE2-NEXT: pand %xmm4, %xmm8
-; SSE2-NEXT: pshufd {{.*#+}} xmm3 = xmm3[1,1,3,3]
-; SSE2-NEXT: por %xmm8, %xmm3
-; SSE2-NEXT: pand %xmm3, %xmm5
-; SSE2-NEXT: pandn %xmm1, %xmm3
-; SSE2-NEXT: por %xmm5, %xmm3
-; SSE2-NEXT: pxor %xmm0, %xmm2
-; SSE2-NEXT: pshufd {{.*#+}} xmm4 = xmm2[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm6, %xmm4
-; SSE2-NEXT: pcmpgtd %xmm7, %xmm2
-; SSE2-NEXT: pshufd {{.*#+}} xmm5 = xmm2[0,0,2,2]
-; SSE2-NEXT: pand %xmm4, %xmm5
-; SSE2-NEXT: pshufd {{.*#+}} xmm2 = xmm2[1,1,3,3]
-; SSE2-NEXT: por %xmm5, %xmm2
-; SSE2-NEXT: pand %xmm2, %xmm0
-; SSE2-NEXT: pandn %xmm1, %xmm2
-; SSE2-NEXT: por %xmm2, %xmm0
-; SSE2-NEXT: shufps {{.*#+}} xmm0 = xmm0[0,2],xmm3[0,2]
-; SSE2-NEXT: retq
-;
-; SSSE3-LABEL: trunc_ssat_v4i64_v4i32:
-; SSSE3: # %bb.0:
-; SSSE3-NEXT: movdqa {{.*#+}} xmm3 = [2147483647,2147483647]
-; SSSE3-NEXT: movdqa {{.*#+}} xmm2 = [2147483648,2147483648]
-; SSSE3-NEXT: movdqa %xmm0, %xmm4
-; SSSE3-NEXT: pxor %xmm2, %xmm4
-; SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm4[1,1,3,3]
-; SSSE3-NEXT: pxor %xmm6, %xmm6
-; SSSE3-NEXT: pcmpeqd %xmm6, %xmm5
-; SSSE3-NEXT: movdqa {{.*#+}} xmm7 = [4294967295,4294967295]
-; SSSE3-NEXT: movdqa %xmm7, %xmm8
-; SSSE3-NEXT: pcmpgtd %xmm4, %xmm8
-; SSSE3-NEXT: pshufd {{.*#+}} xmm4 = xmm8[0,0,2,2]
-; SSSE3-NEXT: pand %xmm5, %xmm4
-; SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm8[1,1,3,3]
-; SSSE3-NEXT: por %xmm4, %xmm5
-; SSSE3-NEXT: pand %xmm5, %xmm0
-; SSSE3-NEXT: pandn %xmm3, %xmm5
-; SSSE3-NEXT: por %xmm5, %xmm0
-; SSSE3-NEXT: movdqa %xmm1, %xmm4
-; SSSE3-NEXT: pxor %xmm2, %xmm4
-; SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm4[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm6, %xmm5
-; SSSE3-NEXT: pcmpgtd %xmm4, %xmm7
-; SSSE3-NEXT: pshufd {{.*#+}} xmm4 = xmm7[0,0,2,2]
-; SSSE3-NEXT: pand %xmm5, %xmm4
-; SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm7[1,1,3,3]
-; SSSE3-NEXT: por %xmm4, %xmm5
-; SSSE3-NEXT: pand %xmm5, %xmm1
-; SSSE3-NEXT: pandn %xmm3, %xmm5
-; SSSE3-NEXT: por %xmm1, %xmm5
-; SSSE3-NEXT: movdqa {{.*#+}} xmm1 = [18446744071562067968,18446744071562067968]
-; SSSE3-NEXT: movdqa %xmm5, %xmm3
-; SSSE3-NEXT: pxor %xmm2, %xmm3
-; SSSE3-NEXT: pshufd {{.*#+}} xmm4 = xmm3[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm6, %xmm6
-; SSSE3-NEXT: pcmpeqd %xmm6, %xmm4
-; SSSE3-NEXT: movdqa {{.*#+}} xmm7 = [18446744069414584320,18446744069414584320]
-; SSSE3-NEXT: pcmpgtd %xmm7, %xmm3
-; SSSE3-NEXT: pshufd {{.*#+}} xmm8 = xmm3[0,0,2,2]
-; SSSE3-NEXT: pand %xmm4, %xmm8
-; SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm3[1,1,3,3]
-; SSSE3-NEXT: por %xmm8, %xmm3
-; SSSE3-NEXT: pand %xmm3, %xmm5
-; SSSE3-NEXT: pandn %xmm1, %xmm3
-; SSSE3-NEXT: por %xmm5, %xmm3
-; SSSE3-NEXT: pxor %xmm0, %xmm2
-; SSSE3-NEXT: pshufd {{.*#+}} xmm4 = xmm2[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm6, %xmm4
-; SSSE3-NEXT: pcmpgtd %xmm7, %xmm2
-; SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm2[0,0,2,2]
-; SSSE3-NEXT: pand %xmm4, %xmm5
-; SSSE3-NEXT: pshufd {{.*#+}} xmm2 = xmm2[1,1,3,3]
-; SSSE3-NEXT: por %xmm5, %xmm2
-; SSSE3-NEXT: pand %xmm2, %xmm0
-; SSSE3-NEXT: pandn %xmm1, %xmm2
-; SSSE3-NEXT: por %xmm2, %xmm0
-; SSSE3-NEXT: shufps {{.*#+}} xmm0 = xmm0[0,2],xmm3[0,2]
-; SSSE3-NEXT: retq
+; SSE2-SSSE3-LABEL: trunc_ssat_v4i64_v4i32:
+; SSE2-SSSE3: # %bb.0:
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm3 = [2147483647,2147483647]
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm2 = [2147483648,2147483648]
+; SSE2-SSSE3-NEXT: movdqa %xmm0, %xmm4
+; SSE2-SSSE3-NEXT: pxor %xmm2, %xmm4
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm4[1,1,3,3]
+; SSE2-SSSE3-NEXT: pxor %xmm6, %xmm6
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm6, %xmm5
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm7 = [4294967295,4294967295]
+; SSE2-SSSE3-NEXT: movdqa %xmm7, %xmm8
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm4, %xmm8
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm4 = xmm8[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm5, %xmm4
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm8[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm4, %xmm5
+; SSE2-SSSE3-NEXT: pand %xmm5, %xmm0
+; SSE2-SSSE3-NEXT: pandn %xmm3, %xmm5
+; SSE2-SSSE3-NEXT: por %xmm5, %xmm0
+; SSE2-SSSE3-NEXT: movdqa %xmm1, %xmm4
+; SSE2-SSSE3-NEXT: pxor %xmm2, %xmm4
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm4[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm6, %xmm5
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm4, %xmm7
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm4 = xmm7[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm5, %xmm4
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm7[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm4, %xmm5
+; SSE2-SSSE3-NEXT: pand %xmm5, %xmm1
+; SSE2-SSSE3-NEXT: pandn %xmm3, %xmm5
+; SSE2-SSSE3-NEXT: por %xmm1, %xmm5
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm1 = [18446744071562067968,18446744071562067968]
+; SSE2-SSSE3-NEXT: movdqa %xmm5, %xmm3
+; SSE2-SSSE3-NEXT: pxor %xmm2, %xmm3
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm4 = xmm3[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm6, %xmm6
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm6, %xmm4
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm7 = [18446744069414584320,18446744069414584320]
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm7, %xmm3
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm8 = xmm3[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm4, %xmm8
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm3[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm8, %xmm3
+; SSE2-SSSE3-NEXT: pand %xmm3, %xmm5
+; SSE2-SSSE3-NEXT: pandn %xmm1, %xmm3
+; SSE2-SSSE3-NEXT: por %xmm5, %xmm3
+; SSE2-SSSE3-NEXT: pxor %xmm0, %xmm2
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm4 = xmm2[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm6, %xmm4
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm7, %xmm2
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm2[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm4, %xmm5
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm2 = xmm2[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm5, %xmm2
+; SSE2-SSSE3-NEXT: pand %xmm2, %xmm0
+; SSE2-SSSE3-NEXT: pandn %xmm1, %xmm2
+; SSE2-SSSE3-NEXT: por %xmm2, %xmm0
+; SSE2-SSSE3-NEXT: shufps {{.*#+}} xmm0 = xmm0[0,2],xmm3[0,2]
+; SSE2-SSSE3-NEXT: retq
;
; SSE41-LABEL: trunc_ssat_v4i64_v4i32:
; SSE41: # %bb.0:
@@ -606,235 +481,120 @@ define <4 x i32> @trunc_ssat_v4i64_v4i32(<4 x i64> %a0) {
define <8 x i32> @trunc_ssat_v8i64_v8i32(ptr %p0) "min-legal-vector-width"="256" {
-; SSE2-LABEL: trunc_ssat_v8i64_v8i32:
-; SSE2: # %bb.0:
-; SSE2-NEXT: movdqa (%rdi), %xmm3
-; SSE2-NEXT: movdqa 16(%rdi), %xmm5
-; SSE2-NEXT: movdqa 32(%rdi), %xmm7
-; SSE2-NEXT: movdqa 48(%rdi), %xmm1
-; SSE2-NEXT: movdqa {{.*#+}} xmm4 = [2147483647,2147483647]
-; SSE2-NEXT: movdqa {{.*#+}} xmm0 = [2147483648,2147483648]
-; SSE2-NEXT: movdqa %xmm3, %xmm2
-; SSE2-NEXT: pxor %xmm0, %xmm2
-; SSE2-NEXT: pshufd {{.*#+}} xmm9 = xmm2[1,1,3,3]
-; SSE2-NEXT: pxor %xmm8, %xmm8
-; SSE2-NEXT: pcmpeqd %xmm8, %xmm9
-; SSE2-NEXT: movdqa {{.*#+}} xmm6 = [4294967295,4294967295]
-; SSE2-NEXT: movdqa %xmm6, %xmm10
-; SSE2-NEXT: pcmpgtd %xmm2, %xmm10
-; SSE2-NEXT: pshufd {{.*#+}} xmm11 = xmm10[0,0,2,2]
-; SSE2-NEXT: pand %xmm9, %xmm11
-; SSE2-NEXT: pshufd {{.*#+}} xmm2 = xmm10[1,1,3,3]
-; SSE2-NEXT: por %xmm11, %xmm2
-; SSE2-NEXT: pand %xmm2, %xmm3
-; SSE2-NEXT: pandn %xmm4, %xmm2
-; SSE2-NEXT: por %xmm3, %xmm2
-; SSE2-NEXT: movdqa %xmm5, %xmm3
-; SSE2-NEXT: pxor %xmm0, %xmm3
-; SSE2-NEXT: pshufd {{.*#+}} xmm9 = xmm3[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm8, %xmm9
-; SSE2-NEXT: movdqa %xmm6, %xmm10
-; SSE2-NEXT: pcmpgtd %xmm3, %xmm10
-; SSE2-NEXT: pshufd {{.*#+}} xmm11 = xmm10[0,0,2,2]
-; SSE2-NEXT: pand %xmm9, %xmm11
-; SSE2-NEXT: pshufd {{.*#+}} xmm3 = xmm10[1,1,3,3]
-; SSE2-NEXT: por %xmm11, %xmm3
-; SSE2-NEXT: pand %xmm3, %xmm5
-; SSE2-NEXT: pandn %xmm4, %xmm3
-; SSE2-NEXT: por %xmm5, %xmm3
-; SSE2-NEXT: movdqa %xmm7, %xmm5
-; SSE2-NEXT: pxor %xmm0, %xmm5
-; SSE2-NEXT: pshufd {{.*#+}} xmm9 = xmm5[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm8, %xmm9
-; SSE2-NEXT: movdqa %xmm6, %xmm10
-; SSE2-NEXT: pcmpgtd %xmm5, %xmm10
-; SSE2-NEXT: pshufd {{.*#+}} xmm11 = xmm10[0,0,2,2]
-; SSE2-NEXT: pand %xmm9, %xmm11
-; SSE2-NEXT: pshufd {{.*#+}} xmm5 = xmm10[1,1,3,3]
-; SSE2-NEXT: por %xmm11, %xmm5
-; SSE2-NEXT: pand %xmm5, %xmm7
-; SSE2-NEXT: pandn %xmm4, %xmm5
-; SSE2-NEXT: por %xmm7, %xmm5
-; SSE2-NEXT: movdqa %xmm1, %xmm7
-; SSE2-NEXT: pxor %xmm0, %xmm7
-; SSE2-NEXT: pshufd {{.*#+}} xmm9 = xmm7[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm8, %xmm9
-; SSE2-NEXT: pcmpgtd %xmm7, %xmm6
-; SSE2-NEXT: pshufd {{.*#+}} xmm7 = xmm6[0,0,2,2]
-; SSE2-NEXT: pand %xmm9, %xmm7
-; SSE2-NEXT: pshufd {{.*#+}} xmm8 = xmm6[1,1,3,3]
-; SSE2-NEXT: por %xmm7, %xmm8
-; SSE2-NEXT: pand %xmm8, %xmm1
-; SSE2-NEXT: pandn %xmm4, %xmm8
-; SSE2-NEXT: por %xmm1, %xmm8
-; SSE2-NEXT: movdqa {{.*#+}} xmm4 = [18446744071562067968,18446744071562067968]
-; SSE2-NEXT: movdqa %xmm8, %xmm1
-; SSE2-NEXT: pxor %xmm0, %xmm1
-; SSE2-NEXT: pshufd {{.*#+}} xmm9 = xmm1[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm6, %xmm6
-; SSE2-NEXT: pcmpeqd %xmm6, %xmm9
-; SSE2-NEXT: movdqa {{.*#+}} xmm7 = [18446744069414584320,18446744069414584320]
-; SSE2-NEXT: pcmpgtd %xmm7, %xmm1
-; SSE2-NEXT: pshufd {{.*#+}} xmm10 = xmm1[0,0,2,2]
-; SSE2-NEXT: pand %xmm9, %xmm10
-; SSE2-NEXT: pshufd {{.*#+}} xmm9 = xmm1[1,1,3,3]
-; SSE2-NEXT: por %xmm10, %xmm9
-; SSE2-NEXT: pand %xmm9, %xmm8
-; SSE2-NEXT: pandn %xmm4, %xmm9
-; SSE2-NEXT: por %xmm8, %xmm9
-; SSE2-NEXT: movdqa %xmm5, %xmm1
-; SSE2-NEXT: pxor %xmm0, %xmm1
-; SSE2-NEXT: pshufd {{.*#+}} xmm8 = xmm1[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm6, %xmm8
-; SSE2-NEXT: pcmpgtd %xmm7, %xmm1
-; SSE2-NEXT: pshufd {{.*#+}} xmm10 = xmm1[0,0,2,2]
-; SSE2-NEXT: pand %xmm8, %xmm10
-; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[1,1,3,3]
-; SSE2-NEXT: por %xmm10, %xmm1
-; SSE2-NEXT: pand %xmm1, %xmm5
-; SSE2-NEXT: pandn %xmm4, %xmm1
-; SSE2-NEXT: por %xmm5, %xmm1
-; SSE2-NEXT: shufps {{.*#+}} xmm1 = xmm1[0,2],xmm9[0,2]
-; SSE2-NEXT: movdqa %xmm3, %xmm5
-; SSE2-NEXT: pxor %xmm0, %xmm5
-; SSE2-NEXT: pshufd {{.*#+}} xmm8 = xmm5[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm6, %xmm8
-; SSE2-NEXT: pcmpgtd %xmm7, %xmm5
-; SSE2-NEXT: pshufd {{.*#+}} xmm9 = xmm5[0,0,2,2]
-; SSE2-NEXT: pand %xmm8, %xmm9
-; SSE2-NEXT: pshufd {{.*#+}} xmm5 = xmm5[1,1,3,3]
-; SSE2-NEXT: por %xmm9, %xmm5
-; SSE2-NEXT: pand %xmm5, %xmm3
-; SSE2-NEXT: pandn %xmm4, %xmm5
-; SSE2-NEXT: por %xmm3, %xmm5
-; SSE2-NEXT: pxor %xmm2, %xmm0
-; SSE2-NEXT: pshufd {{.*#+}} xmm3 = xmm0[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm6, %xmm3
-; SSE2-NEXT: pcmpgtd %xmm7, %xmm0
-; SSE2-NEXT: pshufd {{.*#+}} xmm6 = xmm0[0,0,2,2]
-; SSE2-NEXT: pand %xmm3, %xmm6
-; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,3,3]
-; SSE2-NEXT: por %xmm6, %xmm0
-; SSE2-NEXT: pand %xmm0, %xmm2
-; SSE2-NEXT: pandn %xmm4, %xmm0
-; SSE2-NEXT: por %xmm2, %xmm0
-; SSE2-NEXT: shufps {{.*#+}} xmm0 = xmm0[0,2],xmm5[0,2]
-; SSE2-NEXT: retq
-;
-; SSSE3-LABEL: trunc_ssat_v8i64_v8i32:
-; SSSE3: # %bb.0:
-; SSSE3-NEXT: movdqa (%rdi), %xmm3
-; SSSE3-NEXT: movdqa 16(%rdi), %xmm5
-; SSSE3-NEXT: movdqa 32(%rdi), %xmm7
-; SSSE3-NEXT: movdqa 48(%rdi), %xmm1
-; SSSE3-NEXT: movdqa {{.*#+}} xmm4 = [2147483647,2147483647]
-; SSSE3-NEXT: movdqa {{.*#+}} xmm0 = [2147483648,2147483648]
-; SSSE3-NEXT: movdqa %xmm3, %xmm2
-; SSSE3-NEXT: pxor %xmm0, %xmm2
-; SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm2[1,1,3,3]
-; SSSE3-NEXT: pxor %xmm8, %xmm8
-; SSSE3-NEXT: pcmpeqd %xmm8, %xmm9
-; SSSE3-NEXT: movdqa {{.*#+}} xmm6 = [4294967295,4294967295]
-; SSSE3-NEXT: movdqa %xmm6, %xmm10
-; SSSE3-NEXT: pcmpgtd %xmm2, %xmm10
-; SSSE3-NEXT: pshufd {{.*#+}} xmm11 = xmm10[0,0,2,2]
-; SSSE3-NEXT: pand %xmm9, %xmm11
-; SSSE3-NEXT: pshufd {{.*#+}} xmm2 = xmm10[1,1,3,3]
-; SSSE3-NEXT: por %xmm11, %xmm2
-; SSSE3-NEXT: pand %xmm2, %xmm3
-; SSSE3-NEXT: pandn %xmm4, %xmm2
-; SSSE3-NEXT: por %xmm3, %xmm2
-; SSSE3-NEXT: movdqa %xmm5, %xmm3
-; SSSE3-NEXT: pxor %xmm0, %xmm3
-; SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm3[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm8, %xmm9
-; SSSE3-NEXT: movdqa %xmm6, %xmm10
-; SSSE3-NEXT: pcmpgtd %xmm3, %xmm10
-; SSSE3-NEXT: pshufd {{.*#+}} xmm11 = xmm10[0,0,2,2]
-; SSSE3-NEXT: pand %xmm9, %xmm11
-; SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm10[1,1,3,3]
-; SSSE3-NEXT: por %xmm11, %xmm3
-; SSSE3-NEXT: pand %xmm3, %xmm5
-; SSSE3-NEXT: pandn %xmm4, %xmm3
-; SSSE3-NEXT: por %xmm5, %xmm3
-; SSSE3-NEXT: movdqa %xmm7, %xmm5
-; SSSE3-NEXT: pxor %xmm0, %xmm5
-; SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm5[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm8, %xmm9
-; SSSE3-NEXT: movdqa %xmm6, %xmm10
-; SSSE3-NEXT: pcmpgtd %xmm5, %xmm10
-; SSSE3-NEXT: pshufd {{.*#+}} xmm11 = xmm10[0,0,2,2]
-; SSSE3-NEXT: pand %xmm9, %xmm11
-; SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm10[1,1,3,3]
-; SSSE3-NEXT: por %xmm11, %xmm5
-; SSSE3-NEXT: pand %xmm5, %xmm7
-; SSSE3-NEXT: pandn %xmm4, %xmm5
-; SSSE3-NEXT: por %xmm7, %xmm5
-; SSSE3-NEXT: movdqa %xmm1, %xmm7
-; SSSE3-NEXT: pxor %xmm0, %xmm7
-; SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm7[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm8, %xmm9
-; SSSE3-NEXT: pcmpgtd %xmm7, %xmm6
-; SSSE3-NEXT: pshufd {{.*#+}} xmm7 = xmm6[0,0,2,2]
-; SSSE3-NEXT: pand %xmm9, %xmm7
-; SSSE3-NEXT: pshufd {{.*#+}} xmm8 = xmm6[1,1,3,3]
-; SSSE3-NEXT: por %xmm7, %xmm8
-; SSSE3-NEXT: pand %xmm8, %xmm1
-; SSSE3-NEXT: pandn %xmm4, %xmm8
-; SSSE3-NEXT: por %xmm1, %xmm8
-; SSSE3-NEXT: movdqa {{.*#+}} xmm4 = [18446744071562067968,18446744071562067968]
-; SSSE3-NEXT: movdqa %xmm8, %xmm1
-; SSSE3-NEXT: pxor %xmm0, %xmm1
-; SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm1[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm6, %xmm6
-; SSSE3-NEXT: pcmpeqd %xmm6, %xmm9
-; SSSE3-NEXT: movdqa {{.*#+}} xmm7 = [18446744069414584320,18446744069414584320]
-; SSSE3-NEXT: pcmpgtd %xmm7, %xmm1
-; SSSE3-NEXT: pshufd {{.*#+}} xmm10 = xmm1[0,0,2,2]
-; SSSE3-NEXT: pand %xmm9, %xmm10
-; SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm1[1,1,3,3]
-; SSSE3-NEXT: por %xmm10, %xmm9
-; SSSE3-NEXT: pand %xmm9, %xmm8
-; SSSE3-NEXT: pandn %xmm4, %xmm9
-; SSSE3-NEXT: por %xmm8, %xmm9
-; SSSE3-NEXT: movdqa %xmm5, %xmm1
-; SSSE3-NEXT: pxor %xmm0, %xmm1
-; SSSE3-NEXT: pshufd {{.*#+}} xmm8 = xmm1[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm6, %xmm8
-; SSSE3-NEXT: pcmpgtd %xmm7, %xmm1
-; SSSE3-NEXT: pshufd {{.*#+}} xmm10 = xmm1[0,0,2,2]
-; SSSE3-NEXT: pand %xmm8, %xmm10
-; SSSE3-NEXT: pshufd {{.*#+}} xmm1 = xmm1[1,1,3,3]
-; SSSE3-NEXT: por %xmm10, %xmm1
-; SSSE3-NEXT: pand %xmm1, %xmm5
-; SSSE3-NEXT: pandn %xmm4, %xmm1
-; SSSE3-NEXT: por %xmm5, %xmm1
-; SSSE3-NEXT: shufps {{.*#+}} xmm1 = xmm1[0,2],xmm9[0,2]
-; SSSE3-NEXT: movdqa %xmm3, %xmm5
-; SSSE3-NEXT: pxor %xmm0, %xmm5
-; SSSE3-NEXT: pshufd {{.*#+}} xmm8 = xmm5[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm6, %xmm8
-; SSSE3-NEXT: pcmpgtd %xmm7, %xmm5
-; SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm5[0,0,2,2]
-; SSSE3-NEXT: pand %xmm8, %xmm9
-; SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm5[1,1,3,3]
-; SSSE3-NEXT: por %xmm9, %xmm5
-; SSSE3-NEXT: pand %xmm5, %xmm3
-; SSSE3-NEXT: pandn %xmm4, %xmm5
-; SSSE3-NEXT: por %xmm3, %xmm5
-; SSSE3-NEXT: pxor %xmm2, %xmm0
-; SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm0[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm6, %xmm3
-; SSSE3-NEXT: pcmpgtd %xmm7, %xmm0
-; SSSE3-NEXT: pshufd {{.*#+}} xmm6 = xmm0[0,0,2,2]
-; SSSE3-NEXT: pand %xmm3, %xmm6
-; SSSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,3,3]
-; SSSE3-NEXT: por %xmm6, %xmm0
-; SSSE3-NEXT: pand %xmm0, %xmm2
-; SSSE3-NEXT: pandn %xmm4, %xmm0
-; SSSE3-NEXT: por %xmm2, %xmm0
-; SSSE3-NEXT: shufps {{.*#+}} xmm0 = xmm0[0,2],xmm5[0,2]
-; SSSE3-NEXT: retq
+; SSE2-SSSE3-LABEL: trunc_ssat_v8i64_v8i32:
+; SSE2-SSSE3: # %bb.0:
+; SSE2-SSSE3-NEXT: movdqa (%rdi), %xmm3
+; SSE2-SSSE3-NEXT: movdqa 16(%rdi), %xmm5
+; SSE2-SSSE3-NEXT: movdqa 32(%rdi), %xmm7
+; SSE2-SSSE3-NEXT: movdqa 48(%rdi), %xmm1
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm4 = [2147483647,2147483647]
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm0 = [2147483648,2147483648]
+; SSE2-SSSE3-NEXT: movdqa %xmm3, %xmm2
+; SSE2-SSSE3-NEXT: pxor %xmm0, %xmm2
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm2[1,1,3,3]
+; SSE2-SSSE3-NEXT: pxor %xmm8, %xmm8
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm8, %xmm9
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm6 = [4294967295,4294967295]
+; SSE2-SSSE3-NEXT: movdqa %xmm6, %xmm10
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm2, %xmm10
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm11 = xmm10[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm9, %xmm11
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm2 = xmm10[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm11, %xmm2
+; SSE2-SSSE3-NEXT: pand %xmm2, %xmm3
+; SSE2-SSSE3-NEXT: pandn %xmm4, %xmm2
+; SSE2-SSSE3-NEXT: por %xmm3, %xmm2
+; SSE2-SSSE3-NEXT: movdqa %xmm5, %xmm3
+; SSE2-SSSE3-NEXT: pxor %xmm0, %xmm3
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm3[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm8, %xmm9
+; SSE2-SSSE3-NEXT: movdqa %xmm6, %xmm10
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm3, %xmm10
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm11 = xmm10[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm9, %xmm11
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm10[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm11, %xmm3
+; SSE2-SSSE3-NEXT: pand %xmm3, %xmm5
+; SSE2-SSSE3-NEXT: pandn %xmm4, %xmm3
+; SSE2-SSSE3-NEXT: por %xmm5, %xmm3
+; SSE2-SSSE3-NEXT: movdqa %xmm7, %xmm5
+; SSE2-SSSE3-NEXT: pxor %xmm0, %xmm5
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm5[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm8, %xmm9
+; SSE2-SSSE3-NEXT: movdqa %xmm6, %xmm10
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm5, %xmm10
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm11 = xmm10[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm9, %xmm11
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm10[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm11, %xmm5
+; SSE2-SSSE3-NEXT: pand %xmm5, %xmm7
+; SSE2-SSSE3-NEXT: pandn %xmm4, %xmm5
+; SSE2-SSSE3-NEXT: por %xmm7, %xmm5
+; SSE2-SSSE3-NEXT: movdqa %xmm1, %xmm7
+; SSE2-SSSE3-NEXT: pxor %xmm0, %xmm7
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm7[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm8, %xmm9
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm7, %xmm6
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm7 = xmm6[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm9, %xmm7
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm8 = xmm6[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm7, %xmm8
+; SSE2-SSSE3-NEXT: pand %xmm8, %xmm1
+; SSE2-SSSE3-NEXT: pandn %xmm4, %xmm8
+; SSE2-SSSE3-NEXT: por %xmm1, %xmm8
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm4 = [18446744071562067968,18446744071562067968]
+; SSE2-SSSE3-NEXT: movdqa %xmm8, %xmm1
+; SSE2-SSSE3-NEXT: pxor %xmm0, %xmm1
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm1[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm6, %xmm6
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm6, %xmm9
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm7 = [18446744069414584320,18446744069414584320]
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm7, %xmm1
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm10 = xmm1[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm9, %xmm10
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm1[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm10, %xmm9
+; SSE2-SSSE3-NEXT: pand %xmm9, %xmm8
+; SSE2-SSSE3-NEXT: pandn %xmm4, %xmm9
+; SSE2-SSSE3-NEXT: por %xmm8, %xmm9
+; SSE2-SSSE3-NEXT: movdqa %xmm5, %xmm1
+; SSE2-SSSE3-NEXT: pxor %xmm0, %xmm1
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm8 = xmm1[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm6, %xmm8
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm7, %xmm1
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm10 = xmm1[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm8, %xmm10
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm1 = xmm1[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm10, %xmm1
+; SSE2-SSSE3-NEXT: pand %xmm1, %xmm5
+; SSE2-SSSE3-NEXT: pandn %xmm4, %xmm1
+; SSE2-SSSE3-NEXT: por %xmm5, %xmm1
+; SSE2-SSSE3-NEXT: shufps {{.*#+}} xmm1 = xmm1[0,2],xmm9[0,2]
+; SSE2-SSSE3-NEXT: movdqa %xmm3, %xmm5
+; SSE2-SSSE3-NEXT: pxor %xmm0, %xmm5
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm8 = xmm5[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm6, %xmm8
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm7, %xmm5
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm5[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm8, %xmm9
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm5[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm9, %xmm5
+; SSE2-SSSE3-NEXT: pand %xmm5, %xmm3
+; SSE2-SSSE3-NEXT: pandn %xmm4, %xmm5
+; SSE2-SSSE3-NEXT: por %xmm3, %xmm5
+; SSE2-SSSE3-NEXT: pxor %xmm2, %xmm0
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm0[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm6, %xmm3
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm7, %xmm0
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm6 = xmm0[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm3, %xmm6
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm6, %xmm0
+; SSE2-SSSE3-NEXT: pand %xmm0, %xmm2
+; SSE2-SSSE3-NEXT: pandn %xmm4, %xmm0
+; SSE2-SSSE3-NEXT: por %xmm2, %xmm0
+; SSE2-SSSE3-NEXT: shufps {{.*#+}} xmm0 = xmm0[0,2],xmm5[0,2]
+; SSE2-SSSE3-NEXT: retq
;
; SSE41-LABEL: trunc_ssat_v8i64_v8i32:
; SSE41: # %bb.0:
@@ -1049,71 +809,38 @@ define <8 x i32> @trunc_ssat_v8i64_v8i32(ptr %p0) "min-legal-vector-width"="256"
;
define <2 x i16> @trunc_ssat_v2i64_v2i16(<2 x i64> %a0) {
-; SSE2-LABEL: trunc_ssat_v2i64_v2i16:
-; SSE2: # %bb.0:
-; SSE2-NEXT: movdqa {{.*#+}} xmm1 = [2147483648,2147483648]
-; SSE2-NEXT: movdqa %xmm0, %xmm2
-; SSE2-NEXT: pxor %xmm1, %xmm2
-; SSE2-NEXT: pshufd {{.*#+}} xmm3 = xmm2[1,1,3,3]
-; SSE2-NEXT: pxor %xmm4, %xmm4
-; SSE2-NEXT: pcmpeqd %xmm3, %xmm4
-; SSE2-NEXT: movdqa {{.*#+}} xmm3 = [2147516415,2147516415]
-; SSE2-NEXT: pcmpgtd %xmm2, %xmm3
-; SSE2-NEXT: pshufd {{.*#+}} xmm2 = xmm3[0,0,2,2]
-; SSE2-NEXT: pand %xmm4, %xmm2
-; SSE2-NEXT: pshufd {{.*#+}} xmm3 = xmm3[1,1,3,3]
-; SSE2-NEXT: por %xmm2, %xmm3
-; SSE2-NEXT: pand %xmm3, %xmm0
-; SSE2-NEXT: pandn {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm3
-; SSE2-NEXT: por %xmm0, %xmm3
-; SSE2-NEXT: pxor %xmm3, %xmm1
-; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm1[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm2, %xmm2
-; SSE2-NEXT: pcmpeqd %xmm0, %xmm2
-; SSE2-NEXT: pcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
-; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm1[0,0,2,2]
-; SSE2-NEXT: pand %xmm2, %xmm0
-; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[1,1,3,3]
-; SSE2-NEXT: por %xmm0, %xmm1
-; SSE2-NEXT: pand %xmm1, %xmm3
-; SSE2-NEXT: pandn {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
-; SSE2-NEXT: por %xmm3, %xmm1
-; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm1[0,2,2,3]
-; SSE2-NEXT: pshuflw {{.*#+}} xmm0 = xmm0[0,2,2,3,4,5,6,7]
-; SSE2-NEXT: retq
-;
-; SSSE3-LABEL: trunc_ssat_v2i64_v2i16:
-; SSSE3: # %bb.0:
-; SSSE3-NEXT: movdqa {{.*#+}} xmm1 = [2147483648,2147483648]
-; SSSE3-NEXT: movdqa %xmm0, %xmm2
-; SSSE3-NEXT: pxor %xmm1, %xmm2
-; SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm2[1,1,3,3]
-; SSSE3-NEXT: pxor %xmm4, %xmm4
-; SSSE3-NEXT: pcmpeqd %xmm3, %xmm4
-; SSSE3-NEXT: movdqa {{.*#+}} xmm3 = [2147516415,2147516415]
-; SSSE3-NEXT: pcmpgtd %xmm2, %xmm3
-; SSSE3-NEXT: pshufd {{.*#+}} xmm2 = xmm3[0,0,2,2]
-; SSSE3-NEXT: pand %xmm4, %xmm2
-; SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm3[1,1,3,3]
-; SSSE3-NEXT: por %xmm2, %xmm3
-; SSSE3-NEXT: pand %xmm3, %xmm0
-; SSSE3-NEXT: pandn {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm3
-; SSSE3-NEXT: por %xmm0, %xmm3
-; SSSE3-NEXT: pxor %xmm3, %xmm1
-; SSSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm1[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm2, %xmm2
-; SSSE3-NEXT: pcmpeqd %xmm0, %xmm2
-; SSSE3-NEXT: pcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
-; SSSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm1[0,0,2,2]
-; SSSE3-NEXT: pand %xmm2, %xmm0
-; SSSE3-NEXT: pshufd {{.*#+}} xmm1 = xmm1[1,1,3,3]
-; SSSE3-NEXT: por %xmm0, %xmm1
-; SSSE3-NEXT: pand %xmm1, %xmm3
-; SSSE3-NEXT: pandn {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
-; SSSE3-NEXT: por %xmm3, %xmm1
-; SSSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm1[0,2,2,3]
-; SSSE3-NEXT: pshuflw {{.*#+}} xmm0 = xmm0[0,2,2,3,4,5,6,7]
-; SSSE3-NEXT: retq
+; SSE2-SSSE3-LABEL: trunc_ssat_v2i64_v2i16:
+; SSE2-SSSE3: # %bb.0:
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm1 = [2147483648,2147483648]
+; SSE2-SSSE3-NEXT: movdqa %xmm0, %xmm2
+; SSE2-SSSE3-NEXT: pxor %xmm1, %xmm2
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm2[1,1,3,3]
+; SSE2-SSSE3-NEXT: pxor %xmm4, %xmm4
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm3, %xmm4
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm3 = [2147516415,2147516415]
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm2, %xmm3
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm2 = xmm3[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm4, %xmm2
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm3[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm2, %xmm3
+; SSE2-SSSE3-NEXT: pand %xmm3, %xmm0
+; SSE2-SSSE3-NEXT: pandn {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm3
+; SSE2-SSSE3-NEXT: por %xmm0, %xmm3
+; SSE2-SSSE3-NEXT: pxor %xmm3, %xmm1
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm1[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm2, %xmm2
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm0, %xmm2
+; SSE2-SSSE3-NEXT: pcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm1[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm2, %xmm0
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm1 = xmm1[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm0, %xmm1
+; SSE2-SSSE3-NEXT: pand %xmm1, %xmm3
+; SSE2-SSSE3-NEXT: pandn {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
+; SSE2-SSSE3-NEXT: por %xmm3, %xmm1
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm1[0,2,2,3]
+; SSE2-SSSE3-NEXT: pshuflw {{.*#+}} xmm0 = xmm0[0,2,2,3,4,5,6,7]
+; SSE2-SSSE3-NEXT: retq
;
; SSE41-LABEL: trunc_ssat_v2i64_v2i16:
; SSE41: # %bb.0:
@@ -1217,73 +944,39 @@ define <2 x i16> @trunc_ssat_v2i64_v2i16(<2 x i64> %a0) {
}
define void @trunc_ssat_v2i64_v2i16_store(<2 x i64> %a0, ptr%p1) {
-; SSE2-LABEL: trunc_ssat_v2i64_v2i16_store:
-; SSE2: # %bb.0:
-; SSE2-NEXT: movdqa {{.*#+}} xmm1 = [2147483648,2147483648]
-; SSE2-NEXT: movdqa %xmm0, %xmm2
-; SSE2-NEXT: pxor %xmm1, %xmm2
-; SSE2-NEXT: pshufd {{.*#+}} xmm3 = xmm2[1,1,3,3]
-; SSE2-NEXT: pxor %xmm4, %xmm4
-; SSE2-NEXT: pcmpeqd %xmm3, %xmm4
-; SSE2-NEXT: movdqa {{.*#+}} xmm3 = [2147516415,2147516415]
-; SSE2-NEXT: pcmpgtd %xmm2, %xmm3
-; SSE2-NEXT: pshufd {{.*#+}} xmm2 = xmm3[0,0,2,2]
-; SSE2-NEXT: pand %xmm4, %xmm2
-; SSE2-NEXT: pshufd {{.*#+}} xmm3 = xmm3[1,1,3,3]
-; SSE2-NEXT: por %xmm2, %xmm3
-; SSE2-NEXT: pand %xmm3, %xmm0
-; SSE2-NEXT: pandn {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm3
-; SSE2-NEXT: por %xmm0, %xmm3
-; SSE2-NEXT: pxor %xmm3, %xmm1
-; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm1[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm2, %xmm2
-; SSE2-NEXT: pcmpeqd %xmm0, %xmm2
-; SSE2-NEXT: pcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
-; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm1[0,0,2,2]
-; SSE2-NEXT: pand %xmm2, %xmm0
-; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[1,1,3,3]
-; SSE2-NEXT: por %xmm0, %xmm1
-; SSE2-NEXT: pand %xmm1, %xmm3
-; SSE2-NEXT: pandn {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
-; SSE2-NEXT: por %xmm3, %xmm1
-; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm1[0,2,2,3]
-; SSE2-NEXT: pshuflw {{.*#+}} xmm0 = xmm0[0,2,2,3,4,5,6,7]
-; SSE2-NEXT: movd %xmm0, (%rdi)
-; SSE2-NEXT: retq
-;
-; SSSE3-LABEL: trunc_ssat_v2i64_v2i16_store:
-; SSSE3: # %bb.0:
-; SSSE3-NEXT: movdqa {{.*#+}} xmm1 = [2147483648,2147483648]
-; SSSE3-NEXT: movdqa %xmm0, %xmm2
-; SSSE3-NEXT: pxor %xmm1, %xmm2
-; SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm2[1,1,3,3]
-; SSSE3-NEXT: pxor %xmm4, %xmm4
-; SSSE3-NEXT: pcmpeqd %xmm3, %xmm4
-; SSSE3-NEXT: movdqa {{.*#+}} xmm3 = [2147516415,2147516415]
-; SSSE3-NEXT: pcmpgtd %xmm2, %xmm3
-; SSSE3-NEXT: pshufd {{.*#+}} xmm2 = xmm3[0,0,2,2]
-; SSSE3-NEXT: pand %xmm4, %xmm2
-; SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm3[1,1,3,3]
-; SSSE3-NEXT: por %xmm2, %xmm3
-; SSSE3-NEXT: pand %xmm3, %xmm0
-; SSSE3-NEXT: pandn {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm3
-; SSSE3-NEXT: por %xmm0, %xmm3
-; SSSE3-NEXT: pxor %xmm3, %xmm1
-; SSSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm1[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm2, %xmm2
-; SSSE3-NEXT: pcmpeqd %xmm0, %xmm2
-; SSSE3-NEXT: pcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
-; SSSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm1[0,0,2,2]
-; SSSE3-NEXT: pand %xmm2, %xmm0
-; SSSE3-NEXT: pshufd {{.*#+}} xmm1 = xmm1[1,1,3,3]
-; SSSE3-NEXT: por %xmm0, %xmm1
-; SSSE3-NEXT: pand %xmm1, %xmm3
-; SSSE3-NEXT: pandn {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
-; SSSE3-NEXT: por %xmm3, %xmm1
-; SSSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm1[0,2,2,3]
-; SSSE3-NEXT: pshuflw {{.*#+}} xmm0 = xmm0[0,2,2,3,4,5,6,7]
-; SSSE3-NEXT: movd %xmm0, (%rdi)
-; SSSE3-NEXT: retq
+; SSE2-SSSE3-LABEL: trunc_ssat_v2i64_v2i16_store:
+; SSE2-SSSE3: # %bb.0:
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm1 = [2147483648,2147483648]
+; SSE2-SSSE3-NEXT: movdqa %xmm0, %xmm2
+; SSE2-SSSE3-NEXT: pxor %xmm1, %xmm2
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm2[1,1,3,3]
+; SSE2-SSSE3-NEXT: pxor %xmm4, %xmm4
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm3, %xmm4
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm3 = [2147516415,2147516415]
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm2, %xmm3
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm2 = xmm3[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm4, %xmm2
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm3[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm2, %xmm3
+; SSE2-SSSE3-NEXT: pand %xmm3, %xmm0
+; SSE2-SSSE3-NEXT: pandn {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm3
+; SSE2-SSSE3-NEXT: por %xmm0, %xmm3
+; SSE2-SSSE3-NEXT: pxor %xmm3, %xmm1
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm1[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm2, %xmm2
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm0, %xmm2
+; SSE2-SSSE3-NEXT: pcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm1[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm2, %xmm0
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm1 = xmm1[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm0, %xmm1
+; SSE2-SSSE3-NEXT: pand %xmm1, %xmm3
+; SSE2-SSSE3-NEXT: pandn {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
+; SSE2-SSSE3-NEXT: por %xmm3, %xmm1
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm1[0,2,2,3]
+; SSE2-SSSE3-NEXT: pshuflw {{.*#+}} xmm0 = xmm0[0,2,2,3,4,5,6,7]
+; SSE2-SSSE3-NEXT: movd %xmm0, (%rdi)
+; SSE2-SSSE3-NEXT: retq
;
; SSE41-LABEL: trunc_ssat_v2i64_v2i16_store:
; SSE41: # %bb.0:
@@ -1394,127 +1087,66 @@ define void @trunc_ssat_v2i64_v2i16_store(<2 x i64> %a0, ptr%p1) {
}
define <4 x i16> @trunc_ssat_v4i64_v4i16(<4 x i64> %a0) {
-; SSE2-LABEL: trunc_ssat_v4i64_v4i16:
-; SSE2: # %bb.0:
-; SSE2-NEXT: movdqa {{.*#+}} xmm3 = [32767,32767]
-; SSE2-NEXT: movdqa {{.*#+}} xmm2 = [2147483648,2147483648]
-; SSE2-NEXT: movdqa %xmm0, %xmm4
-; SSE2-NEXT: pxor %xmm2, %xmm4
-; SSE2-NEXT: pshufd {{.*#+}} xmm5 = xmm4[1,1,3,3]
-; SSE2-NEXT: pxor %xmm6, %xmm6
-; SSE2-NEXT: pcmpeqd %xmm6, %xmm5
-; SSE2-NEXT: movdqa {{.*#+}} xmm7 = [2147516415,2147516415]
-; SSE2-NEXT: movdqa %xmm7, %xmm8
-; SSE2-NEXT: pcmpgtd %xmm4, %xmm8
-; SSE2-NEXT: pshufd {{.*#+}} xmm4 = xmm8[0,0,2,2]
-; SSE2-NEXT: pand %xmm5, %xmm4
-; SSE2-NEXT: pshufd {{.*#+}} xmm5 = xmm8[1,1,3,3]
-; SSE2-NEXT: por %xmm4, %xmm5
-; SSE2-NEXT: pand %xmm5, %xmm0
-; SSE2-NEXT: pandn %xmm3, %xmm5
-; SSE2-NEXT: por %xmm5, %xmm0
-; SSE2-NEXT: movdqa %xmm1, %xmm4
-; SSE2-NEXT: pxor %xmm2, %xmm4
-; SSE2-NEXT: pshufd {{.*#+}} xmm5 = xmm4[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm6, %xmm5
-; SSE2-NEXT: pcmpgtd %xmm4, %xmm7
-; SSE2-NEXT: pshufd {{.*#+}} xmm4 = xmm7[0,0,2,2]
-; SSE2-NEXT: pand %xmm5, %xmm4
-; SSE2-NEXT: pshufd {{.*#+}} xmm5 = xmm7[1,1,3,3]
-; SSE2-NEXT: por %xmm4, %xmm5
-; SSE2-NEXT: pand %xmm5, %xmm1
-; SSE2-NEXT: pandn %xmm3, %xmm5
-; SSE2-NEXT: por %xmm1, %xmm5
-; SSE2-NEXT: movdqa {{.*#+}} xmm1 = [18446744073709518848,18446744073709518848]
-; SSE2-NEXT: movdqa %xmm5, %xmm3
-; SSE2-NEXT: pxor %xmm2, %xmm3
-; SSE2-NEXT: pshufd {{.*#+}} xmm4 = xmm3[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm6, %xmm6
-; SSE2-NEXT: pcmpeqd %xmm6, %xmm4
-; SSE2-NEXT: movdqa {{.*#+}} xmm7 = [18446744071562035200,18446744071562035200]
-; SSE2-NEXT: pcmpgtd %xmm7, %xmm3
-; SSE2-NEXT: pshufd {{.*#+}} xmm8 = xmm3[0,0,2,2]
-; SSE2-NEXT: pand %xmm4, %xmm8
-; SSE2-NEXT: pshufd {{.*#+}} xmm3 = xmm3[1,1,3,3]
-; SSE2-NEXT: por %xmm8, %xmm3
-; SSE2-NEXT: pand %xmm3, %xmm5
-; SSE2-NEXT: pandn %xmm1, %xmm3
-; SSE2-NEXT: por %xmm5, %xmm3
-; SSE2-NEXT: pxor %xmm0, %xmm2
-; SSE2-NEXT: pshufd {{.*#+}} xmm4 = xmm2[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm6, %xmm4
-; SSE2-NEXT: pcmpgtd %xmm7, %xmm2
-; SSE2-NEXT: pshufd {{.*#+}} xmm5 = xmm2[0,0,2,2]
-; SSE2-NEXT: pand %xmm4, %xmm5
-; SSE2-NEXT: pshufd {{.*#+}} xmm2 = xmm2[1,1,3,3]
-; SSE2-NEXT: por %xmm5, %xmm2
-; SSE2-NEXT: pand %xmm2, %xmm0
-; SSE2-NEXT: pandn %xmm1, %xmm2
-; SSE2-NEXT: por %xmm2, %xmm0
-; SSE2-NEXT: packssdw %xmm3, %xmm0
-; SSE2-NEXT: packssdw %xmm0, %xmm0
-; SSE2-NEXT: retq
-;
-; SSSE3-LABEL: trunc_ssat_v4i64_v4i16:
-; SSSE3: # %bb.0:
-; SSSE3-NEXT: movdqa {{.*#+}} xmm3 = [32767,32767]
-; SSSE3-NEXT: movdqa {{.*#+}} xmm2 = [2147483648,2147483648]
-; SSSE3-NEXT: movdqa %xmm0, %xmm4
-; SSSE3-NEXT: pxor %xmm2, %xmm4
-; SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm4[1,1,3,3]
-; SSSE3-NEXT: pxor %xmm6, %xmm6
-; SSSE3-NEXT: pcmpeqd %xmm6, %xmm5
-; SSSE3-NEXT: movdqa {{.*#+}} xmm7 = [2147516415,2147516415]
-; SSSE3-NEXT: movdqa %xmm7, %xmm8
-; SSSE3-NEXT: pcmpgtd %xmm4, %xmm8
-; SSSE3-NEXT: pshufd {{.*#+}} xmm4 = xmm8[0,0,2,2]
-; SSSE3-NEXT: pand %xmm5, %xmm4
-; SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm8[1,1,3,3]
-; SSSE3-NEXT: por %xmm4, %xmm5
-; SSSE3-NEXT: pand %xmm5, %xmm0
-; SSSE3-NEXT: pandn %xmm3, %xmm5
-; SSSE3-NEXT: por %xmm5, %xmm0
-; SSSE3-NEXT: movdqa %xmm1, %xmm4
-; SSSE3-NEXT: pxor %xmm2, %xmm4
-; SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm4[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm6, %xmm5
-; SSSE3-NEXT: pcmpgtd %xmm4, %xmm7
-; SSSE3-NEXT: pshufd {{.*#+}} xmm4 = xmm7[0,0,2,2]
-; SSSE3-NEXT: pand %xmm5, %xmm4
-; SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm7[1,1,3,3]
-; SSSE3-NEXT: por %xmm4, %xmm5
-; SSSE3-NEXT: pand %xmm5, %xmm1
-; SSSE3-NEXT: pandn %xmm3, %xmm5
-; SSSE3-NEXT: por %xmm1, %xmm5
-; SSSE3-NEXT: movdqa {{.*#+}} xmm1 = [18446744073709518848,18446744073709518848]
-; SSSE3-NEXT: movdqa %xmm5, %xmm3
-; SSSE3-NEXT: pxor %xmm2, %xmm3
-; SSSE3-NEXT: pshufd {{.*#+}} xmm4 = xmm3[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm6, %xmm6
-; SSSE3-NEXT: pcmpeqd %xmm6, %xmm4
-; SSSE3-NEXT: movdqa {{.*#+}} xmm7 = [18446744071562035200,18446744071562035200]
-; SSSE3-NEXT: pcmpgtd %xmm7, %xmm3
-; SSSE3-NEXT: pshufd {{.*#+}} xmm8 = xmm3[0,0,2,2]
-; SSSE3-NEXT: pand %xmm4, %xmm8
-; SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm3[1,1,3,3]
-; SSSE3-NEXT: por %xmm8, %xmm3
-; SSSE3-NEXT: pand %xmm3, %xmm5
-; SSSE3-NEXT: pandn %xmm1, %xmm3
-; SSSE3-NEXT: por %xmm5, %xmm3
-; SSSE3-NEXT: pxor %xmm0, %xmm2
-; SSSE3-NEXT: pshufd {{.*#+}} xmm4 = xmm2[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm6, %xmm4
-; SSSE3-NEXT: pcmpgtd %xmm7, %xmm2
-; SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm2[0,0,2,2]
-; SSSE3-NEXT: pand %xmm4, %xmm5
-; SSSE3-NEXT: pshufd {{.*#+}} xmm2 = xmm2[1,1,3,3]
-; SSSE3-NEXT: por %xmm5, %xmm2
-; SSSE3-NEXT: pand %xmm2, %xmm0
-; SSSE3-NEXT: pandn %xmm1, %xmm2
-; SSSE3-NEXT: por %xmm2, %xmm0
-; SSSE3-NEXT: packssdw %xmm3, %xmm0
-; SSSE3-NEXT: packssdw %xmm0, %xmm0
-; SSSE3-NEXT: retq
+; SSE2-SSSE3-LABEL: trunc_ssat_v4i64_v4i16:
+; SSE2-SSSE3: # %bb.0:
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm3 = [32767,32767]
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm2 = [2147483648,2147483648]
+; SSE2-SSSE3-NEXT: movdqa %xmm0, %xmm4
+; SSE2-SSSE3-NEXT: pxor %xmm2, %xmm4
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm4[1,1,3,3]
+; SSE2-SSSE3-NEXT: pxor %xmm6, %xmm6
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm6, %xmm5
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm7 = [2147516415,2147516415]
+; SSE2-SSSE3-NEXT: movdqa %xmm7, %xmm8
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm4, %xmm8
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm4 = xmm8[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm5, %xmm4
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm8[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm4, %xmm5
+; SSE2-SSSE3-NEXT: pand %xmm5, %xmm0
+; SSE2-SSSE3-NEXT: pandn %xmm3, %xmm5
+; SSE2-SSSE3-NEXT: por %xmm5, %xmm0
+; SSE2-SSSE3-NEXT: movdqa %xmm1, %xmm4
+; SSE2-SSSE3-NEXT: pxor %xmm2, %xmm4
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm4[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm6, %xmm5
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm4, %xmm7
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm4 = xmm7[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm5, %xmm4
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm7[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm4, %xmm5
+; SSE2-SSSE3-NEXT: pand %xmm5, %xmm1
+; SSE2-SSSE3-NEXT: pandn %xmm3, %xmm5
+; SSE2-SSSE3-NEXT: por %xmm1, %xmm5
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm1 = [18446744073709518848,18446744073709518848]
+; SSE2-SSSE3-NEXT: movdqa %xmm5, %xmm3
+; SSE2-SSSE3-NEXT: pxor %xmm2, %xmm3
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm4 = xmm3[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm6, %xmm6
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm6, %xmm4
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm7 = [18446744071562035200,18446744071562035200]
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm7, %xmm3
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm8 = xmm3[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm4, %xmm8
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm3[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm8, %xmm3
+; SSE2-SSSE3-NEXT: pand %xmm3, %xmm5
+; SSE2-SSSE3-NEXT: pandn %xmm1, %xmm3
+; SSE2-SSSE3-NEXT: por %xmm5, %xmm3
+; SSE2-SSSE3-NEXT: pxor %xmm0, %xmm2
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm4 = xmm2[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm6, %xmm4
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm7, %xmm2
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm2[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm4, %xmm5
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm2 = xmm2[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm5, %xmm2
+; SSE2-SSSE3-NEXT: pand %xmm2, %xmm0
+; SSE2-SSSE3-NEXT: pandn %xmm1, %xmm2
+; SSE2-SSSE3-NEXT: por %xmm2, %xmm0
+; SSE2-SSSE3-NEXT: packssdw %xmm3, %xmm0
+; SSE2-SSSE3-NEXT: packssdw %xmm0, %xmm0
+; SSE2-SSSE3-NEXT: retq
;
; SSE41-LABEL: trunc_ssat_v4i64_v4i16:
; SSE41: # %bb.0:
@@ -1614,155 +1246,93 @@ define <4 x i16> @trunc_ssat_v4i64_v4i16(<4 x i64> %a0) {
; AVX512VL-NEXT: retq
;
; AVX512BW-LABEL: trunc_ssat_v4i64_v4i16:
-; AVX512BW: # %bb.0:
-; AVX512BW-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
-; AVX512BW-NEXT: vpmovsqw %zmm0, %xmm0
-; AVX512BW-NEXT: vzeroupper
-; AVX512BW-NEXT: retq
-;
-; AVX512BWVL-LABEL: trunc_ssat_v4i64_v4i16:
-; AVX512BWVL: # %bb.0:
-; AVX512BWVL-NEXT: vpmovsqw %ymm0, %xmm0
-; AVX512BWVL-NEXT: vzeroupper
-; AVX512BWVL-NEXT: retq
-;
-; SKX-LABEL: trunc_ssat_v4i64_v4i16:
-; SKX: # %bb.0:
-; SKX-NEXT: vpmovsqw %ymm0, %xmm0
-; SKX-NEXT: vzeroupper
-; SKX-NEXT: retq
- %1 = icmp slt <4 x i64> %a0, <i64 32767, i64 32767, i64 32767, i64 32767>
- %2 = select <4 x i1> %1, <4 x i64> %a0, <4 x i64> <i64 32767, i64 32767, i64 32767, i64 32767>
- %3 = icmp sgt <4 x i64> %2, <i64 -32768, i64 -32768, i64 -32768, i64 -32768>
- %4 = select <4 x i1> %3, <4 x i64> %2, <4 x i64> <i64 -32768, i64 -32768, i64 -32768, i64 -32768>
- %5 = trunc <4 x i64> %4 to <4 x i16>
- ret <4 x i16> %5
-}
-
-define void @trunc_ssat_v4i64_v4i16_store(<4 x i64> %a0, ptr%p1) {
-; SSE2-LABEL: trunc_ssat_v4i64_v4i16_store:
-; SSE2: # %bb.0:
-; SSE2-NEXT: movdqa {{.*#+}} xmm4 = [32767,32767]
-; SSE2-NEXT: movdqa {{.*#+}} xmm2 = [2147483648,2147483648]
-; SSE2-NEXT: movdqa %xmm0, %xmm3
-; SSE2-NEXT: pxor %xmm2, %xmm3
-; SSE2-NEXT: pshufd {{.*#+}} xmm5 = xmm3[1,1,3,3]
-; SSE2-NEXT: pxor %xmm6, %xmm6
-; SSE2-NEXT: pcmpeqd %xmm6, %xmm5
-; SSE2-NEXT: movdqa {{.*#+}} xmm7 = [2147516415,2147516415]
-; SSE2-NEXT: movdqa %xmm7, %xmm8
-; SSE2-NEXT: pcmpgtd %xmm3, %xmm8
-; SSE2-NEXT: pshufd {{.*#+}} xmm9 = xmm8[0,0,2,2]
-; SSE2-NEXT: pand %xmm5, %xmm9
-; SSE2-NEXT: pshufd {{.*#+}} xmm3 = xmm8[1,1,3,3]
-; SSE2-NEXT: por %xmm9, %xmm3
-; SSE2-NEXT: pand %xmm3, %xmm0
-; SSE2-NEXT: pandn %xmm4, %xmm3
-; SSE2-NEXT: por %xmm0, %xmm3
-; SSE2-NEXT: movdqa %xmm1, %xmm0
-; SSE2-NEXT: pxor %xmm2, %xmm0
-; SSE2-NEXT: pshufd {{.*#+}} xmm5 = xmm0[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm6, %xmm5
-; SSE2-NEXT: pcmpgtd %xmm0, %xmm7
-; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm7[0,0,2,2]
-; SSE2-NEXT: pand %xmm5, %xmm0
-; SSE2-NEXT: pshufd {{.*#+}} xmm5 = xmm7[1,1,3,3]
-; SSE2-NEXT: por %xmm0, %xmm5
-; SSE2-NEXT: pand %xmm5, %xmm1
-; SSE2-NEXT: pandn %xmm4, %xmm5
-; SSE2-NEXT: por %xmm1, %xmm5
-; SSE2-NEXT: movdqa {{.*#+}} xmm0 = [18446744073709518848,18446744073709518848]
-; SSE2-NEXT: movdqa %xmm5, %xmm1
-; SSE2-NEXT: pxor %xmm2, %xmm1
-; SSE2-NEXT: pshufd {{.*#+}} xmm4 = xmm1[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm6, %xmm6
-; SSE2-NEXT: pcmpeqd %xmm6, %xmm4
-; SSE2-NEXT: movdqa {{.*#+}} xmm7 = [18446744071562035200,18446744071562035200]
-; SSE2-NEXT: pcmpgtd %xmm7, %xmm1
-; SSE2-NEXT: pshufd {{.*#+}} xmm8 = xmm1[0,0,2,2]
-; SSE2-NEXT: pand %xmm4, %xmm8
-; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[1,1,3,3]
-; SSE2-NEXT: por %xmm8, %xmm1
-; SSE2-NEXT: pand %xmm1, %xmm5
-; SSE2-NEXT: pandn %xmm0, %xmm1
-; SSE2-NEXT: por %xmm5, %xmm1
-; SSE2-NEXT: pxor %xmm3, %xmm2
-; SSE2-NEXT: pshufd {{.*#+}} xmm4 = xmm2[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm6, %xmm4
-; SSE2-NEXT: pcmpgtd %xmm7, %xmm2
-; SSE2-NEXT: pshufd {{.*#+}} xmm5 = xmm2[0,0,2,2]
-; SSE2-NEXT: pand %xmm4, %xmm5
-; SSE2-NEXT: pshufd {{.*#+}} xmm2 = xmm2[1,1,3,3]
-; SSE2-NEXT: por %xmm5, %xmm2
-; SSE2-NEXT: pand %xmm2, %xmm3
-; SSE2-NEXT: pandn %xmm0, %xmm2
-; SSE2-NEXT: por %xmm3, %xmm2
-; SSE2-NEXT: packssdw %xmm1, %xmm2
-; SSE2-NEXT: packssdw %xmm2, %xmm2
-; SSE2-NEXT: movq %xmm2, (%rdi)
-; SSE2-NEXT: retq
+; AVX512BW: # %bb.0:
+; AVX512BW-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
+; AVX512BW-NEXT: vpmovsqw %zmm0, %xmm0
+; AVX512BW-NEXT: vzeroupper
+; AVX512BW-NEXT: retq
;
-; SSSE3-LABEL: trunc_ssat_v4i64_v4i16_store:
-; SSSE3: # %bb.0:
-; SSSE3-NEXT: movdqa {{.*#+}} xmm4 = [32767,32767]
-; SSSE3-NEXT: movdqa {{.*#+}} xmm2 = [2147483648,2147483648]
-; SSSE3-NEXT: movdqa %xmm0, %xmm3
-; SSSE3-NEXT: pxor %xmm2, %xmm3
-; SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm3[1,1,3,3]
-; SSSE3-NEXT: pxor %xmm6, %xmm6
-; SSSE3-NEXT: pcmpeqd %xmm6, %xmm5
-; SSSE3-NEXT: movdqa {{.*#+}} xmm7 = [2147516415,2147516415]
-; SSSE3-NEXT: movdqa %xmm7, %xmm8
-; SSSE3-NEXT: pcmpgtd %xmm3, %xmm8
-; SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm8[0,0,2,2]
-; SSSE3-NEXT: pand %xmm5, %xmm9
-; SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm8[1,1,3,3]
-; SSSE3-NEXT: por %xmm9, %xmm3
-; SSSE3-NEXT: pand %xmm3, %xmm0
-; SSSE3-NEXT: pandn %xmm4, %xmm3
-; SSSE3-NEXT: por %xmm0, %xmm3
-; SSSE3-NEXT: movdqa %xmm1, %xmm0
-; SSSE3-NEXT: pxor %xmm2, %xmm0
-; SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm0[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm6, %xmm5
-; SSSE3-NEXT: pcmpgtd %xmm0, %xmm7
-; SSSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm7[0,0,2,2]
-; SSSE3-NEXT: pand %xmm5, %xmm0
-; SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm7[1,1,3,3]
-; SSSE3-NEXT: por %xmm0, %xmm5
-; SSSE3-NEXT: pand %xmm5, %xmm1
-; SSSE3-NEXT: pandn %xmm4, %xmm5
-; SSSE3-NEXT: por %xmm1, %xmm5
-; SSSE3-NEXT: movdqa {{.*#+}} xmm0 = [18446744073709518848,18446744073709518848]
-; SSSE3-NEXT: movdqa %xmm5, %xmm1
-; SSSE3-NEXT: pxor %xmm2, %xmm1
-; SSSE3-NEXT: pshufd {{.*#+}} xmm4 = xmm1[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm6, %xmm6
-; SSSE3-NEXT: pcmpeqd %xmm6, %xmm4
-; SSSE3-NEXT: movdqa {{.*#+}} xmm7 = [18446744071562035200,18446744071562035200]
-; SSSE3-NEXT: pcmpgtd %xmm7, %xmm1
-; SSSE3-NEXT: pshufd {{.*#+}} xmm8 = xmm1[0,0,2,2]
-; SSSE3-NEXT: pand %xmm4, %xmm8
-; SSSE3-NEXT: pshufd {{.*#+}} xmm1 = xmm1[1,1,3,3]
-; SSSE3-NEXT: por %xmm8, %xmm1
-; SSSE3-NEXT: pand %xmm1, %xmm5
-; SSSE3-NEXT: pandn %xmm0, %xmm1
-; SSSE3-NEXT: por %xmm5, %xmm1
-; SSSE3-NEXT: pxor %xmm3, %xmm2
-; SSSE3-NEXT: pshufd {{.*#+}} xmm4 = xmm2[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm6, %xmm4
-; SSSE3-NEXT: pcmpgtd %xmm7, %xmm2
-; SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm2[0,0,2,2]
-; SSSE3-NEXT: pand %xmm4, %xmm5
-; SSSE3-NEXT: pshufd {{.*#+}} xmm2 = xmm2[1,1,3,3]
-; SSSE3-NEXT: por %xmm5, %xmm2
-; SSSE3-NEXT: pand %xmm2, %xmm3
-; SSSE3-NEXT: pandn %xmm0, %xmm2
-; SSSE3-NEXT: por %xmm3, %xmm2
-; SSSE3-NEXT: packssdw %xmm1, %xmm2
-; SSSE3-NEXT: packssdw %xmm2, %xmm2
-; SSSE3-NEXT: movq %xmm2, (%rdi)
-; SSSE3-NEXT: retq
+; AVX512BWVL-LABEL: trunc_ssat_v4i64_v4i16:
+; AVX512BWVL: # %bb.0:
+; AVX512BWVL-NEXT: vpmovsqw %ymm0, %xmm0
+; AVX512BWVL-NEXT: vzeroupper
+; AVX512BWVL-NEXT: retq
+;
+; SKX-LABEL: trunc_ssat_v4i64_v4i16:
+; SKX: # %bb.0:
+; SKX-NEXT: vpmovsqw %ymm0, %xmm0
+; SKX-NEXT: vzeroupper
+; SKX-NEXT: retq
+ %1 = icmp slt <4 x i64> %a0, <i64 32767, i64 32767, i64 32767, i64 32767>
+ %2 = select <4 x i1> %1, <4 x i64> %a0, <4 x i64> <i64 32767, i64 32767, i64 32767, i64 32767>
+ %3 = icmp sgt <4 x i64> %2, <i64 -32768, i64 -32768, i64 -32768, i64 -32768>
+ %4 = select <4 x i1> %3, <4 x i64> %2, <4 x i64> <i64 -32768, i64 -32768, i64 -32768, i64 -32768>
+ %5 = trunc <4 x i64> %4 to <4 x i16>
+ ret <4 x i16> %5
+}
+
+define void @trunc_ssat_v4i64_v4i16_store(<4 x i64> %a0, ptr%p1) {
+; SSE2-SSSE3-LABEL: trunc_ssat_v4i64_v4i16_store:
+; SSE2-SSSE3: # %bb.0:
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm4 = [32767,32767]
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm2 = [2147483648,2147483648]
+; SSE2-SSSE3-NEXT: movdqa %xmm0, %xmm3
+; SSE2-SSSE3-NEXT: pxor %xmm2, %xmm3
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm3[1,1,3,3]
+; SSE2-SSSE3-NEXT: pxor %xmm6, %xmm6
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm6, %xmm5
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm7 = [2147516415,2147516415]
+; SSE2-SSSE3-NEXT: movdqa %xmm7, %xmm8
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm3, %xmm8
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm8[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm5, %xmm9
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm8[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm9, %xmm3
+; SSE2-SSSE3-NEXT: pand %xmm3, %xmm0
+; SSE2-SSSE3-NEXT: pandn %xmm4, %xmm3
+; SSE2-SSSE3-NEXT: por %xmm0, %xmm3
+; SSE2-SSSE3-NEXT: movdqa %xmm1, %xmm0
+; SSE2-SSSE3-NEXT: pxor %xmm2, %xmm0
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm0[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm6, %xmm5
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm0, %xmm7
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm7[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm5, %xmm0
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm7[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm0, %xmm5
+; SSE2-SSSE3-NEXT: pand %xmm5, %xmm1
+; SSE2-SSSE3-NEXT: pandn %xmm4, %xmm5
+; SSE2-SSSE3-NEXT: por %xmm1, %xmm5
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm0 = [18446744073709518848,18446744073709518848]
+; SSE2-SSSE3-NEXT: movdqa %xmm5, %xmm1
+; SSE2-SSSE3-NEXT: pxor %xmm2, %xmm1
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm4 = xmm1[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm6, %xmm6
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm6, %xmm4
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm7 = [18446744071562035200,18446744071562035200]
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm7, %xmm1
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm8 = xmm1[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm4, %xmm8
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm1 = xmm1[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm8, %xmm1
+; SSE2-SSSE3-NEXT: pand %xmm1, %xmm5
+; SSE2-SSSE3-NEXT: pandn %xmm0, %xmm1
+; SSE2-SSSE3-NEXT: por %xmm5, %xmm1
+; SSE2-SSSE3-NEXT: pxor %xmm3, %xmm2
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm4 = xmm2[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm6, %xmm4
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm7, %xmm2
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm2[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm4, %xmm5
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm2 = xmm2[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm5, %xmm2
+; SSE2-SSSE3-NEXT: pand %xmm2, %xmm3
+; SSE2-SSSE3-NEXT: pandn %xmm0, %xmm2
+; SSE2-SSSE3-NEXT: por %xmm3, %xmm2
+; SSE2-SSSE3-NEXT: packssdw %xmm1, %xmm2
+; SSE2-SSSE3-NEXT: packssdw %xmm2, %xmm2
+; SSE2-SSSE3-NEXT: movq %xmm2, (%rdi)
+; SSE2-SSSE3-NEXT: retq
;
; SSE41-LABEL: trunc_ssat_v4i64_v4i16_store:
; SSE41: # %bb.0:
@@ -1893,237 +1463,121 @@ define void @trunc_ssat_v4i64_v4i16_store(<4 x i64> %a0, ptr%p1) {
}
define <8 x i16> @trunc_ssat_v8i64_v8i16(ptr %p0) "min-legal-vector-width"="256" {
-; SSE2-LABEL: trunc_ssat_v8i64_v8i16:
-; SSE2: # %bb.0:
-; SSE2-NEXT: movdqa (%rdi), %xmm6
-; SSE2-NEXT: movdqa 16(%rdi), %xmm0
-; SSE2-NEXT: movdqa 32(%rdi), %xmm3
-; SSE2-NEXT: movdqa 48(%rdi), %xmm5
-; SSE2-NEXT: movdqa {{.*#+}} xmm4 = [32767,32767]
-; SSE2-NEXT: movdqa {{.*#+}} xmm1 = [2147483648,2147483648]
-; SSE2-NEXT: movdqa %xmm3, %xmm2
-; SSE2-NEXT: pxor %xmm1, %xmm2
-; SSE2-NEXT: pshufd {{.*#+}} xmm9 = xmm2[1,1,3,3]
-; SSE2-NEXT: pxor %xmm8, %xmm8
-; SSE2-NEXT: pcmpeqd %xmm8, %xmm9
-; SSE2-NEXT: movdqa {{.*#+}} xmm7 = [2147516415,2147516415]
-; SSE2-NEXT: movdqa %xmm7, %xmm10
-; SSE2-NEXT: pcmpgtd %xmm2, %xmm10
-; SSE2-NEXT: pshufd {{.*#+}} xmm11 = xmm10[0,0,2,2]
-; SSE2-NEXT: pand %xmm9, %xmm11
-; SSE2-NEXT: pshufd {{.*#+}} xmm2 = xmm10[1,1,3,3]
-; SSE2-NEXT: por %xmm11, %xmm2
-; SSE2-NEXT: pand %xmm2, %xmm3
-; SSE2-NEXT: pandn %xmm4, %xmm2
-; SSE2-NEXT: por %xmm3, %xmm2
-; SSE2-NEXT: movdqa %xmm5, %xmm3
-; SSE2-NEXT: pxor %xmm1, %xmm3
-; SSE2-NEXT: pshufd {{.*#+}} xmm9 = xmm3[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm8, %xmm9
-; SSE2-NEXT: movdqa %xmm7, %xmm10
-; SSE2-NEXT: pcmpgtd %xmm3, %xmm10
-; SSE2-NEXT: pshufd {{.*#+}} xmm11 = xmm10[0,0,2,2]
-; SSE2-NEXT: pand %xmm9, %xmm11
-; SSE2-NEXT: pshufd {{.*#+}} xmm3 = xmm10[1,1,3,3]
-; SSE2-NEXT: por %xmm11, %xmm3
-; SSE2-NEXT: pand %xmm3, %xmm5
-; SSE2-NEXT: pandn %xmm4, %xmm3
-; SSE2-NEXT: por %xmm5, %xmm3
-; SSE2-NEXT: movdqa %xmm6, %xmm5
-; SSE2-NEXT: pxor %xmm1, %xmm5
-; SSE2-NEXT: pshufd {{.*#+}} xmm9 = xmm5[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm8, %xmm9
-; SSE2-NEXT: movdqa %xmm7, %xmm10
-; SSE2-NEXT: pcmpgtd %xmm5, %xmm10
-; SSE2-NEXT: pshufd {{.*#+}} xmm11 = xmm10[0,0,2,2]
-; SSE2-NEXT: pand %xmm9, %xmm11
-; SSE2-NEXT: pshufd {{.*#+}} xmm5 = xmm10[1,1,3,3]
-; SSE2-NEXT: por %xmm11, %xmm5
-; SSE2-NEXT: pand %xmm5, %xmm6
-; SSE2-NEXT: pandn %xmm4, %xmm5
-; SSE2-NEXT: por %xmm6, %xmm5
-; SSE2-NEXT: movdqa %xmm0, %xmm6
-; SSE2-NEXT: pxor %xmm1, %xmm6
-; SSE2-NEXT: pshufd {{.*#+}} xmm9 = xmm6[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm8, %xmm9
-; SSE2-NEXT: pcmpgtd %xmm6, %xmm7
-; SSE2-NEXT: pshufd {{.*#+}} xmm6 = xmm7[0,0,2,2]
-; SSE2-NEXT: pand %xmm9, %xmm6
-; SSE2-NEXT: pshufd {{.*#+}} xmm8 = xmm7[1,1,3,3]
-; SSE2-NEXT: por %xmm6, %xmm8
-; SSE2-NEXT: pand %xmm8, %xmm0
-; SSE2-NEXT: pandn %xmm4, %xmm8
-; SSE2-NEXT: por %xmm0, %xmm8
-; SSE2-NEXT: movdqa {{.*#+}} xmm4 = [18446744073709518848,18446744073709518848]
-; SSE2-NEXT: movdqa %xmm8, %xmm0
-; SSE2-NEXT: pxor %xmm1, %xmm0
-; SSE2-NEXT: pshufd {{.*#+}} xmm9 = xmm0[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm6, %xmm6
-; SSE2-NEXT: pcmpeqd %xmm6, %xmm9
-; SSE2-NEXT: movdqa {{.*#+}} xmm7 = [18446744071562035200,18446744071562035200]
-; SSE2-NEXT: pcmpgtd %xmm7, %xmm0
-; SSE2-NEXT: pshufd {{.*#+}} xmm10 = xmm0[0,0,2,2]
-; SSE2-NEXT: pand %xmm9, %xmm10
-; SSE2-NEXT: pshufd {{.*#+}} xmm9 = xmm0[1,1,3,3]
-; SSE2-NEXT: por %xmm10, %xmm9
-; SSE2-NEXT: pand %xmm9, %xmm8
-; SSE2-NEXT: pandn %xmm4, %xmm9
-; SSE2-NEXT: por %xmm8, %xmm9
-; SSE2-NEXT: movdqa %xmm5, %xmm0
-; SSE2-NEXT: pxor %xmm1, %xmm0
-; SSE2-NEXT: pshufd {{.*#+}} xmm8 = xmm0[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm6, %xmm8
-; SSE2-NEXT: pcmpgtd %xmm7, %xmm0
-; SSE2-NEXT: pshufd {{.*#+}} xmm10 = xmm0[0,0,2,2]
-; SSE2-NEXT: pand %xmm8, %xmm10
-; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,3,3]
-; SSE2-NEXT: por %xmm10, %xmm0
-; SSE2-NEXT: pand %xmm0, %xmm5
-; SSE2-NEXT: pandn %xmm4, %xmm0
-; SSE2-NEXT: por %xmm5, %xmm0
-; SSE2-NEXT: packssdw %xmm9, %xmm0
-; SSE2-NEXT: movdqa %xmm3, %xmm5
-; SSE2-NEXT: pxor %xmm1, %xmm5
-; SSE2-NEXT: pshufd {{.*#+}} xmm8 = xmm5[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm6, %xmm8
-; SSE2-NEXT: pcmpgtd %xmm7, %xmm5
-; SSE2-NEXT: pshufd {{.*#+}} xmm9 = xmm5[0,0,2,2]
-; SSE2-NEXT: pand %xmm8, %xmm9
-; SSE2-NEXT: pshufd {{.*#+}} xmm5 = xmm5[1,1,3,3]
-; SSE2-NEXT: por %xmm9, %xmm5
-; SSE2-NEXT: pand %xmm5, %xmm3
-; SSE2-NEXT: pandn %xmm4, %xmm5
-; SSE2-NEXT: por %xmm3, %xmm5
-; SSE2-NEXT: pxor %xmm2, %xmm1
-; SSE2-NEXT: pshufd {{.*#+}} xmm3 = xmm1[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm6, %xmm3
-; SSE2-NEXT: pcmpgtd %xmm7, %xmm1
-; SSE2-NEXT: pshufd {{.*#+}} xmm6 = xmm1[0,0,2,2]
-; SSE2-NEXT: pand %xmm3, %xmm6
-; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[1,1,3,3]
-; SSE2-NEXT: por %xmm6, %xmm1
-; SSE2-NEXT: pand %xmm1, %xmm2
-; SSE2-NEXT: pandn %xmm4, %xmm1
-; SSE2-NEXT: por %xmm2, %xmm1
-; SSE2-NEXT: packssdw %xmm5, %xmm1
-; SSE2-NEXT: packssdw %xmm1, %xmm0
-; SSE2-NEXT: retq
-;
-; SSSE3-LABEL: trunc_ssat_v8i64_v8i16:
-; SSSE3: # %bb.0:
-; SSSE3-NEXT: movdqa (%rdi), %xmm6
-; SSSE3-NEXT: movdqa 16(%rdi), %xmm0
-; SSSE3-NEXT: movdqa 32(%rdi), %xmm3
-; SSSE3-NEXT: movdqa 48(%rdi), %xmm5
-; SSSE3-NEXT: movdqa {{.*#+}} xmm4 = [32767,32767]
-; SSSE3-NEXT: movdqa {{.*#+}} xmm1 = [2147483648,2147483648]
-; SSSE3-NEXT: movdqa %xmm3, %xmm2
-; SSSE3-NEXT: pxor %xmm1, %xmm2
-; SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm2[1,1,3,3]
-; SSSE3-NEXT: pxor %xmm8, %xmm8
-; SSSE3-NEXT: pcmpeqd %xmm8, %xmm9
-; SSSE3-NEXT: movdqa {{.*#+}} xmm7 = [2147516415,2147516415]
-; SSSE3-NEXT: movdqa %xmm7, %xmm10
-; SSSE3-NEXT: pcmpgtd %xmm2, %xmm10
-; SSSE3-NEXT: pshufd {{.*#+}} xmm11 = xmm10[0,0,2,2]
-; SSSE3-NEXT: pand %xmm9, %xmm11
-; SSSE3-NEXT: pshufd {{.*#+}} xmm2 = xmm10[1,1,3,3]
-; SSSE3-NEXT: por %xmm11, %xmm2
-; SSSE3-NEXT: pand %xmm2, %xmm3
-; SSSE3-NEXT: pandn %xmm4, %xmm2
-; SSSE3-NEXT: por %xmm3, %xmm2
-; SSSE3-NEXT: movdqa %xmm5, %xmm3
-; SSSE3-NEXT: pxor %xmm1, %xmm3
-; SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm3[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm8, %xmm9
-; SSSE3-NEXT: movdqa %xmm7, %xmm10
-; SSSE3-NEXT: pcmpgtd %xmm3, %xmm10
-; SSSE3-NEXT: pshufd {{.*#+}} xmm11 = xmm10[0,0,2,2]
-; SSSE3-NEXT: pand %xmm9, %xmm11
-; SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm10[1,1,3,3]
-; SSSE3-NEXT: por %xmm11, %xmm3
-; SSSE3-NEXT: pand %xmm3, %xmm5
-; SSSE3-NEXT: pandn %xmm4, %xmm3
-; SSSE3-NEXT: por %xmm5, %xmm3
-; SSSE3-NEXT: movdqa %xmm6, %xmm5
-; SSSE3-NEXT: pxor %xmm1, %xmm5
-; SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm5[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm8, %xmm9
-; SSSE3-NEXT: movdqa %xmm7, %xmm10
-; SSSE3-NEXT: pcmpgtd %xmm5, %xmm10
-; SSSE3-NEXT: pshufd {{.*#+}} xmm11 = xmm10[0,0,2,2]
-; SSSE3-NEXT: pand %xmm9, %xmm11
-; SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm10[1,1,3,3]
-; SSSE3-NEXT: por %xmm11, %xmm5
-; SSSE3-NEXT: pand %xmm5, %xmm6
-; SSSE3-NEXT: pandn %xmm4, %xmm5
-; SSSE3-NEXT: por %xmm6, %xmm5
-; SSSE3-NEXT: movdqa %xmm0, %xmm6
-; SSSE3-NEXT: pxor %xmm1, %xmm6
-; SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm6[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm8, %xmm9
-; SSSE3-NEXT: pcmpgtd %xmm6, %xmm7
-; SSSE3-NEXT: pshufd {{.*#+}} xmm6 = xmm7[0,0,2,2]
-; SSSE3-NEXT: pand %xmm9, %xmm6
-; SSSE3-NEXT: pshufd {{.*#+}} xmm8 = xmm7[1,1,3,3]
-; SSSE3-NEXT: por %xmm6, %xmm8
-; SSSE3-NEXT: pand %xmm8, %xmm0
-; SSSE3-NEXT: pandn %xmm4, %xmm8
-; SSSE3-NEXT: por %xmm0, %xmm8
-; SSSE3-NEXT: movdqa {{.*#+}} xmm4 = [18446744073709518848,18446744073709518848]
-; SSSE3-NEXT: movdqa %xmm8, %xmm0
-; SSSE3-NEXT: pxor %xmm1, %xmm0
-; SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm0[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm6, %xmm6
-; SSSE3-NEXT: pcmpeqd %xmm6, %xmm9
-; SSSE3-NEXT: movdqa {{.*#+}} xmm7 = [18446744071562035200,18446744071562035200]
-; SSSE3-NEXT: pcmpgtd %xmm7, %xmm0
-; SSSE3-NEXT: pshufd {{.*#+}} xmm10 = xmm0[0,0,2,2]
-; SSSE3-NEXT: pand %xmm9, %xmm10
-; SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm0[1,1,3,3]
-; SSSE3-NEXT: por %xmm10, %xmm9
-; SSSE3-NEXT: pand %xmm9, %xmm8
-; SSSE3-NEXT: pandn %xmm4, %xmm9
-; SSSE3-NEXT: por %xmm8, %xmm9
-; SSSE3-NEXT: movdqa %xmm5, %xmm0
-; SSSE3-NEXT: pxor %xmm1, %xmm0
-; SSSE3-NEXT: pshufd {{.*#+}} xmm8 = xmm0[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm6, %xmm8
-; SSSE3-NEXT: pcmpgtd %xmm7, %xmm0
-; SSSE3-NEXT: pshufd {{.*#+}} xmm10 = xmm0[0,0,2,2]
-; SSSE3-NEXT: pand %xmm8, %xmm10
-; SSSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,3,3]
-; SSSE3-NEXT: por %xmm10, %xmm0
-; SSSE3-NEXT: pand %xmm0, %xmm5
-; SSSE3-NEXT: pandn %xmm4, %xmm0
-; SSSE3-NEXT: por %xmm5, %xmm0
-; SSSE3-NEXT: packssdw %xmm9, %xmm0
-; SSSE3-NEXT: movdqa %xmm3, %xmm5
-; SSSE3-NEXT: pxor %xmm1, %xmm5
-; SSSE3-NEXT: pshufd {{.*#+}} xmm8 = xmm5[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm6, %xmm8
-; SSSE3-NEXT: pcmpgtd %xmm7, %xmm5
-; SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm5[0,0,2,2]
-; SSSE3-NEXT: pand %xmm8, %xmm9
-; SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm5[1,1,3,3]
-; SSSE3-NEXT: por %xmm9, %xmm5
-; SSSE3-NEXT: pand %xmm5, %xmm3
-; SSSE3-NEXT: pandn %xmm4, %xmm5
-; SSSE3-NEXT: por %xmm3, %xmm5
-; SSSE3-NEXT: pxor %xmm2, %xmm1
-; SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm1[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm6, %xmm3
-; SSSE3-NEXT: pcmpgtd %xmm7, %xmm1
-; SSSE3-NEXT: pshufd {{.*#+}} xmm6 = xmm1[0,0,2,2]
-; SSSE3-NEXT: pand %xmm3, %xmm6
-; SSSE3-NEXT: pshufd {{.*#+}} xmm1 = xmm1[1,1,3,3]
-; SSSE3-NEXT: por %xmm6, %xmm1
-; SSSE3-NEXT: pand %xmm1, %xmm2
-; SSSE3-NEXT: pandn %xmm4, %xmm1
-; SSSE3-NEXT: por %xmm2, %xmm1
-; SSSE3-NEXT: packssdw %xmm5, %xmm1
-; SSSE3-NEXT: packssdw %xmm1, %xmm0
-; SSSE3-NEXT: retq
+; SSE2-SSSE3-LABEL: trunc_ssat_v8i64_v8i16:
+; SSE2-SSSE3: # %bb.0:
+; SSE2-SSSE3-NEXT: movdqa (%rdi), %xmm6
+; SSE2-SSSE3-NEXT: movdqa 16(%rdi), %xmm0
+; SSE2-SSSE3-NEXT: movdqa 32(%rdi), %xmm3
+; SSE2-SSSE3-NEXT: movdqa 48(%rdi), %xmm5
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm4 = [32767,32767]
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm1 = [2147483648,2147483648]
+; SSE2-SSSE3-NEXT: movdqa %xmm3, %xmm2
+; SSE2-SSSE3-NEXT: pxor %xmm1, %xmm2
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm2[1,1,3,3]
+; SSE2-SSSE3-NEXT: pxor %xmm8, %xmm8
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm8, %xmm9
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm7 = [2147516415,2147516415]
+; SSE2-SSSE3-NEXT: movdqa %xmm7, %xmm10
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm2, %xmm10
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm11 = xmm10[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm9, %xmm11
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm2 = xmm10[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm11, %xmm2
+; SSE2-SSSE3-NEXT: pand %xmm2, %xmm3
+; SSE2-SSSE3-NEXT: pandn %xmm4, %xmm2
+; SSE2-SSSE3-NEXT: por %xmm3, %xmm2
+; SSE2-SSSE3-NEXT: movdqa %xmm5, %xmm3
+; SSE2-SSSE3-NEXT: pxor %xmm1, %xmm3
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm3[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm8, %xmm9
+; SSE2-SSSE3-NEXT: movdqa %xmm7, %xmm10
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm3, %xmm10
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm11 = xmm10[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm9, %xmm11
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm10[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm11, %xmm3
+; SSE2-SSSE3-NEXT: pand %xmm3, %xmm5
+; SSE2-SSSE3-NEXT: pandn %xmm4, %xmm3
+; SSE2-SSSE3-NEXT: por %xmm5, %xmm3
+; SSE2-SSSE3-NEXT: movdqa %xmm6, %xmm5
+; SSE2-SSSE3-NEXT: pxor %xmm1, %xmm5
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm5[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm8, %xmm9
+; SSE2-SSSE3-NEXT: movdqa %xmm7, %xmm10
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm5, %xmm10
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm11 = xmm10[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm9, %xmm11
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm10[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm11, %xmm5
+; SSE2-SSSE3-NEXT: pand %xmm5, %xmm6
+; SSE2-SSSE3-NEXT: pandn %xmm4, %xmm5
+; SSE2-SSSE3-NEXT: por %xmm6, %xmm5
+; SSE2-SSSE3-NEXT: movdqa %xmm0, %xmm6
+; SSE2-SSSE3-NEXT: pxor %xmm1, %xmm6
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm6[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm8, %xmm9
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm6, %xmm7
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm6 = xmm7[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm9, %xmm6
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm8 = xmm7[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm6, %xmm8
+; SSE2-SSSE3-NEXT: pand %xmm8, %xmm0
+; SSE2-SSSE3-NEXT: pandn %xmm4, %xmm8
+; SSE2-SSSE3-NEXT: por %xmm0, %xmm8
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm4 = [18446744073709518848,18446744073709518848]
+; SSE2-SSSE3-NEXT: movdqa %xmm8, %xmm0
+; SSE2-SSSE3-NEXT: pxor %xmm1, %xmm0
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm0[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm6, %xmm6
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm6, %xmm9
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm7 = [18446744071562035200,18446744071562035200]
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm7, %xmm0
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm10 = xmm0[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm9, %xmm10
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm0[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm10, %xmm9
+; SSE2-SSSE3-NEXT: pand %xmm9, %xmm8
+; SSE2-SSSE3-NEXT: pandn %xmm4, %xmm9
+; SSE2-SSSE3-NEXT: por %xmm8, %xmm9
+; SSE2-SSSE3-NEXT: movdqa %xmm5, %xmm0
+; SSE2-SSSE3-NEXT: pxor %xmm1, %xmm0
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm8 = xmm0[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm6, %xmm8
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm7, %xmm0
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm10 = xmm0[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm8, %xmm10
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm10, %xmm0
+; SSE2-SSSE3-NEXT: pand %xmm0, %xmm5
+; SSE2-SSSE3-NEXT: pandn %xmm4, %xmm0
+; SSE2-SSSE3-NEXT: por %xmm5, %xmm0
+; SSE2-SSSE3-NEXT: packssdw %xmm9, %xmm0
+; SSE2-SSSE3-NEXT: movdqa %xmm3, %xmm5
+; SSE2-SSSE3-NEXT: pxor %xmm1, %xmm5
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm8 = xmm5[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm6, %xmm8
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm7, %xmm5
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm5[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm8, %xmm9
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm5[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm9, %xmm5
+; SSE2-SSSE3-NEXT: pand %xmm5, %xmm3
+; SSE2-SSSE3-NEXT: pandn %xmm4, %xmm5
+; SSE2-SSSE3-NEXT: por %xmm3, %xmm5
+; SSE2-SSSE3-NEXT: pxor %xmm2, %xmm1
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm1[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm6, %xmm3
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm7, %xmm1
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm6 = xmm1[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm3, %xmm6
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm1 = xmm1[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm6, %xmm1
+; SSE2-SSSE3-NEXT: pand %xmm1, %xmm2
+; SSE2-SSSE3-NEXT: pandn %xmm4, %xmm1
+; SSE2-SSSE3-NEXT: por %xmm2, %xmm1
+; SSE2-SSSE3-NEXT: packssdw %xmm5, %xmm1
+; SSE2-SSSE3-NEXT: packssdw %xmm1, %xmm0
+; SSE2-SSSE3-NEXT: retq
;
; SSE41-LABEL: trunc_ssat_v8i64_v8i16:
; SSE41: # %bb.0:
@@ -3331,239 +2785,122 @@ define void @trunc_ssat_v4i64_v4i8_store(<4 x i64> %a0, ptr%p1) {
}
define <8 x i8> @trunc_ssat_v8i64_v8i8(ptr %p0) "min-legal-vector-width"="256" {
-; SSE2-LABEL: trunc_ssat_v8i64_v8i8:
-; SSE2: # %bb.0:
-; SSE2-NEXT: movdqa (%rdi), %xmm6
-; SSE2-NEXT: movdqa 16(%rdi), %xmm0
-; SSE2-NEXT: movdqa 32(%rdi), %xmm3
-; SSE2-NEXT: movdqa 48(%rdi), %xmm5
-; SSE2-NEXT: movdqa {{.*#+}} xmm4 = [127,127]
-; SSE2-NEXT: movdqa {{.*#+}} xmm1 = [2147483648,2147483648]
-; SSE2-NEXT: movdqa %xmm3, %xmm2
-; SSE2-NEXT: pxor %xmm1, %xmm2
-; SSE2-NEXT: pshufd {{.*#+}} xmm9 = xmm2[1,1,3,3]
-; SSE2-NEXT: pxor %xmm8, %xmm8
-; SSE2-NEXT: pcmpeqd %xmm8, %xmm9
-; SSE2-NEXT: movdqa {{.*#+}} xmm7 = [2147483775,2147483775]
-; SSE2-NEXT: movdqa %xmm7, %xmm10
-; SSE2-NEXT: pcmpgtd %xmm2, %xmm10
-; SSE2-NEXT: pshufd {{.*#+}} xmm11 = xmm10[0,0,2,2]
-; SSE2-NEXT: pand %xmm9, %xmm11
-; SSE2-NEXT: pshufd {{.*#+}} xmm2 = xmm10[1,1,3,3]
-; SSE2-NEXT: por %xmm11, %xmm2
-; SSE2-NEXT: pand %xmm2, %xmm3
-; SSE2-NEXT: pandn %xmm4, %xmm2
-; SSE2-NEXT: por %xmm3, %xmm2
-; SSE2-NEXT: movdqa %xmm5, %xmm3
-; SSE2-NEXT: pxor %xmm1, %xmm3
-; SSE2-NEXT: pshufd {{.*#+}} xmm9 = xmm3[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm8, %xmm9
-; SSE2-NEXT: movdqa %xmm7, %xmm10
-; SSE2-NEXT: pcmpgtd %xmm3, %xmm10
-; SSE2-NEXT: pshufd {{.*#+}} xmm11 = xmm10[0,0,2,2]
-; SSE2-NEXT: pand %xmm9, %xmm11
-; SSE2-NEXT: pshufd {{.*#+}} xmm3 = xmm10[1,1,3,3]
-; SSE2-NEXT: por %xmm11, %xmm3
-; SSE2-NEXT: pand %xmm3, %xmm5
-; SSE2-NEXT: pandn %xmm4, %xmm3
-; SSE2-NEXT: por %xmm5, %xmm3
-; SSE2-NEXT: movdqa %xmm6, %xmm5
-; SSE2-NEXT: pxor %xmm1, %xmm5
-; SSE2-NEXT: pshufd {{.*#+}} xmm9 = xmm5[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm8, %xmm9
-; SSE2-NEXT: movdqa %xmm7, %xmm10
-; SSE2-NEXT: pcmpgtd %xmm5, %xmm10
-; SSE2-NEXT: pshufd {{.*#+}} xmm11 = xmm10[0,0,2,2]
-; SSE2-NEXT: pand %xmm9, %xmm11
-; SSE2-NEXT: pshufd {{.*#+}} xmm5 = xmm10[1,1,3,3]
-; SSE2-NEXT: por %xmm11, %xmm5
-; SSE2-NEXT: pand %xmm5, %xmm6
-; SSE2-NEXT: pandn %xmm4, %xmm5
-; SSE2-NEXT: por %xmm6, %xmm5
-; SSE2-NEXT: movdqa %xmm0, %xmm6
-; SSE2-NEXT: pxor %xmm1, %xmm6
-; SSE2-NEXT: pshufd {{.*#+}} xmm9 = xmm6[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm8, %xmm9
-; SSE2-NEXT: pcmpgtd %xmm6, %xmm7
-; SSE2-NEXT: pshufd {{.*#+}} xmm6 = xmm7[0,0,2,2]
-; SSE2-NEXT: pand %xmm9, %xmm6
-; SSE2-NEXT: pshufd {{.*#+}} xmm8 = xmm7[1,1,3,3]
-; SSE2-NEXT: por %xmm6, %xmm8
-; SSE2-NEXT: pand %xmm8, %xmm0
-; SSE2-NEXT: pandn %xmm4, %xmm8
-; SSE2-NEXT: por %xmm0, %xmm8
-; SSE2-NEXT: movdqa {{.*#+}} xmm4 = [18446744073709551488,18446744073709551488]
-; SSE2-NEXT: movdqa %xmm8, %xmm0
-; SSE2-NEXT: pxor %xmm1, %xmm0
-; SSE2-NEXT: pshufd {{.*#+}} xmm9 = xmm0[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm6, %xmm6
-; SSE2-NEXT: pcmpeqd %xmm6, %xmm9
-; SSE2-NEXT: movdqa {{.*#+}} xmm7 = [18446744071562067840,18446744071562067840]
-; SSE2-NEXT: pcmpgtd %xmm7, %xmm0
-; SSE2-NEXT: pshufd {{.*#+}} xmm10 = xmm0[0,0,2,2]
-; SSE2-NEXT: pand %xmm9, %xmm10
-; SSE2-NEXT: pshufd {{.*#+}} xmm9 = xmm0[1,1,3,3]
-; SSE2-NEXT: por %xmm10, %xmm9
-; SSE2-NEXT: pand %xmm9, %xmm8
-; SSE2-NEXT: pandn %xmm4, %xmm9
-; SSE2-NEXT: por %xmm8, %xmm9
-; SSE2-NEXT: movdqa %xmm5, %xmm0
-; SSE2-NEXT: pxor %xmm1, %xmm0
-; SSE2-NEXT: pshufd {{.*#+}} xmm8 = xmm0[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm6, %xmm8
-; SSE2-NEXT: pcmpgtd %xmm7, %xmm0
-; SSE2-NEXT: pshufd {{.*#+}} xmm10 = xmm0[0,0,2,2]
-; SSE2-NEXT: pand %xmm8, %xmm10
-; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,3,3]
-; SSE2-NEXT: por %xmm10, %xmm0
-; SSE2-NEXT: pand %xmm0, %xmm5
-; SSE2-NEXT: pandn %xmm4, %xmm0
-; SSE2-NEXT: por %xmm5, %xmm0
-; SSE2-NEXT: packssdw %xmm9, %xmm0
-; SSE2-NEXT: movdqa %xmm3, %xmm5
-; SSE2-NEXT: pxor %xmm1, %xmm5
-; SSE2-NEXT: pshufd {{.*#+}} xmm8 = xmm5[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm6, %xmm8
-; SSE2-NEXT: pcmpgtd %xmm7, %xmm5
-; SSE2-NEXT: pshufd {{.*#+}} xmm9 = xmm5[0,0,2,2]
-; SSE2-NEXT: pand %xmm8, %xmm9
-; SSE2-NEXT: pshufd {{.*#+}} xmm5 = xmm5[1,1,3,3]
-; SSE2-NEXT: por %xmm9, %xmm5
-; SSE2-NEXT: pand %xmm5, %xmm3
-; SSE2-NEXT: pandn %xmm4, %xmm5
-; SSE2-NEXT: por %xmm3, %xmm5
-; SSE2-NEXT: pxor %xmm2, %xmm1
-; SSE2-NEXT: pshufd {{.*#+}} xmm3 = xmm1[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm6, %xmm3
-; SSE2-NEXT: pcmpgtd %xmm7, %xmm1
-; SSE2-NEXT: pshufd {{.*#+}} xmm6 = xmm1[0,0,2,2]
-; SSE2-NEXT: pand %xmm3, %xmm6
-; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[1,1,3,3]
-; SSE2-NEXT: por %xmm6, %xmm1
-; SSE2-NEXT: pand %xmm1, %xmm2
-; SSE2-NEXT: pandn %xmm4, %xmm1
-; SSE2-NEXT: por %xmm2, %xmm1
-; SSE2-NEXT: packssdw %xmm5, %xmm1
-; SSE2-NEXT: packssdw %xmm1, %xmm0
-; SSE2-NEXT: packsswb %xmm0, %xmm0
-; SSE2-NEXT: retq
-;
-; SSSE3-LABEL: trunc_ssat_v8i64_v8i8:
-; SSSE3: # %bb.0:
-; SSSE3-NEXT: movdqa (%rdi), %xmm6
-; SSSE3-NEXT: movdqa 16(%rdi), %xmm0
-; SSSE3-NEXT: movdqa 32(%rdi), %xmm3
-; SSSE3-NEXT: movdqa 48(%rdi), %xmm5
-; SSSE3-NEXT: movdqa {{.*#+}} xmm4 = [127,127]
-; SSSE3-NEXT: movdqa {{.*#+}} xmm1 = [2147483648,2147483648]
-; SSSE3-NEXT: movdqa %xmm3, %xmm2
-; SSSE3-NEXT: pxor %xmm1, %xmm2
-; SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm2[1,1,3,3]
-; SSSE3-NEXT: pxor %xmm8, %xmm8
-; SSSE3-NEXT: pcmpeqd %xmm8, %xmm9
-; SSSE3-NEXT: movdqa {{.*#+}} xmm7 = [2147483775,2147483775]
-; SSSE3-NEXT: movdqa %xmm7, %xmm10
-; SSSE3-NEXT: pcmpgtd %xmm2, %xmm10
-; SSSE3-NEXT: pshufd {{.*#+}} xmm11 = xmm10[0,0,2,2]
-; SSSE3-NEXT: pand %xmm9, %xmm11
-; SSSE3-NEXT: pshufd {{.*#+}} xmm2 = xmm10[1,1,3,3]
-; SSSE3-NEXT: por %xmm11, %xmm2
-; SSSE3-NEXT: pand %xmm2, %xmm3
-; SSSE3-NEXT: pandn %xmm4, %xmm2
-; SSSE3-NEXT: por %xmm3, %xmm2
-; SSSE3-NEXT: movdqa %xmm5, %xmm3
-; SSSE3-NEXT: pxor %xmm1, %xmm3
-; SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm3[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm8, %xmm9
-; SSSE3-NEXT: movdqa %xmm7, %xmm10
-; SSSE3-NEXT: pcmpgtd %xmm3, %xmm10
-; SSSE3-NEXT: pshufd {{.*#+}} xmm11 = xmm10[0,0,2,2]
-; SSSE3-NEXT: pand %xmm9, %xmm11
-; SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm10[1,1,3,3]
-; SSSE3-NEXT: por %xmm11, %xmm3
-; SSSE3-NEXT: pand %xmm3, %xmm5
-; SSSE3-NEXT: pandn %xmm4, %xmm3
-; SSSE3-NEXT: por %xmm5, %xmm3
-; SSSE3-NEXT: movdqa %xmm6, %xmm5
-; SSSE3-NEXT: pxor %xmm1, %xmm5
-; SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm5[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm8, %xmm9
-; SSSE3-NEXT: movdqa %xmm7, %xmm10
-; SSSE3-NEXT: pcmpgtd %xmm5, %xmm10
-; SSSE3-NEXT: pshufd {{.*#+}} xmm11 = xmm10[0,0,2,2]
-; SSSE3-NEXT: pand %xmm9, %xmm11
-; SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm10[1,1,3,3]
-; SSSE3-NEXT: por %xmm11, %xmm5
-; SSSE3-NEXT: pand %xmm5, %xmm6
-; SSSE3-NEXT: pandn %xmm4, %xmm5
-; SSSE3-NEXT: por %xmm6, %xmm5
-; SSSE3-NEXT: movdqa %xmm0, %xmm6
-; SSSE3-NEXT: pxor %xmm1, %xmm6
-; SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm6[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm8, %xmm9
-; SSSE3-NEXT: pcmpgtd %xmm6, %xmm7
-; SSSE3-NEXT: pshufd {{.*#+}} xmm6 = xmm7[0,0,2,2]
-; SSSE3-NEXT: pand %xmm9, %xmm6
-; SSSE3-NEXT: pshufd {{.*#+}} xmm8 = xmm7[1,1,3,3]
-; SSSE3-NEXT: por %xmm6, %xmm8
-; SSSE3-NEXT: pand %xmm8, %xmm0
-; SSSE3-NEXT: pandn %xmm4, %xmm8
-; SSSE3-NEXT: por %xmm0, %xmm8
-; SSSE3-NEXT: movdqa {{.*#+}} xmm4 = [18446744073709551488,18446744073709551488]
-; SSSE3-NEXT: movdqa %xmm8, %xmm0
-; SSSE3-NEXT: pxor %xmm1, %xmm0
-; SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm0[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm6, %xmm6
-; SSSE3-NEXT: pcmpeqd %xmm6, %xmm9
-; SSSE3-NEXT: movdqa {{.*#+}} xmm7 = [18446744071562067840,18446744071562067840]
-; SSSE3-NEXT: pcmpgtd %xmm7, %xmm0
-; SSSE3-NEXT: pshufd {{.*#+}} xmm10 = xmm0[0,0,2,2]
-; SSSE3-NEXT: pand %xmm9, %xmm10
-; SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm0[1,1,3,3]
-; SSSE3-NEXT: por %xmm10, %xmm9
-; SSSE3-NEXT: pand %xmm9, %xmm8
-; SSSE3-NEXT: pandn %xmm4, %xmm9
-; SSSE3-NEXT: por %xmm8, %xmm9
-; SSSE3-NEXT: movdqa %xmm5, %xmm0
-; SSSE3-NEXT: pxor %xmm1, %xmm0
-; SSSE3-NEXT: pshufd {{.*#+}} xmm8 = xmm0[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm6, %xmm8
-; SSSE3-NEXT: pcmpgtd %xmm7, %xmm0
-; SSSE3-NEXT: pshufd {{.*#+}} xmm10 = xmm0[0,0,2,2]
-; SSSE3-NEXT: pand %xmm8, %xmm10
-; SSSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,3,3]
-; SSSE3-NEXT: por %xmm10, %xmm0
-; SSSE3-NEXT: pand %xmm0, %xmm5
-; SSSE3-NEXT: pandn %xmm4, %xmm0
-; SSSE3-NEXT: por %xmm5, %xmm0
-; SSSE3-NEXT: packssdw %xmm9, %xmm0
-; SSSE3-NEXT: movdqa %xmm3, %xmm5
-; SSSE3-NEXT: pxor %xmm1, %xmm5
-; SSSE3-NEXT: pshufd {{.*#+}} xmm8 = xmm5[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm6, %xmm8
-; SSSE3-NEXT: pcmpgtd %xmm7, %xmm5
-; SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm5[0,0,2,2]
-; SSSE3-NEXT: pand %xmm8, %xmm9
-; SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm5[1,1,3,3]
-; SSSE3-NEXT: por %xmm9, %xmm5
-; SSSE3-NEXT: pand %xmm5, %xmm3
-; SSSE3-NEXT: pandn %xmm4, %xmm5
-; SSSE3-NEXT: por %xmm3, %xmm5
-; SSSE3-NEXT: pxor %xmm2, %xmm1
-; SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm1[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm6, %xmm3
-; SSSE3-NEXT: pcmpgtd %xmm7, %xmm1
-; SSSE3-NEXT: pshufd {{.*#+}} xmm6 = xmm1[0,0,2,2]
-; SSSE3-NEXT: pand %xmm3, %xmm6
-; SSSE3-NEXT: pshufd {{.*#+}} xmm1 = xmm1[1,1,3,3]
-; SSSE3-NEXT: por %xmm6, %xmm1
-; SSSE3-NEXT: pand %xmm1, %xmm2
-; SSSE3-NEXT: pandn %xmm4, %xmm1
-; SSSE3-NEXT: por %xmm2, %xmm1
-; SSSE3-NEXT: packssdw %xmm5, %xmm1
-; SSSE3-NEXT: packssdw %xmm1, %xmm0
-; SSSE3-NEXT: packsswb %xmm0, %xmm0
-; SSSE3-NEXT: retq
+; SSE2-SSSE3-LABEL: trunc_ssat_v8i64_v8i8:
+; SSE2-SSSE3: # %bb.0:
+; SSE2-SSSE3-NEXT: movdqa (%rdi), %xmm6
+; SSE2-SSSE3-NEXT: movdqa 16(%rdi), %xmm0
+; SSE2-SSSE3-NEXT: movdqa 32(%rdi), %xmm3
+; SSE2-SSSE3-NEXT: movdqa 48(%rdi), %xmm5
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm4 = [127,127]
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm1 = [2147483648,2147483648]
+; SSE2-SSSE3-NEXT: movdqa %xmm3, %xmm2
+; SSE2-SSSE3-NEXT: pxor %xmm1, %xmm2
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm2[1,1,3,3]
+; SSE2-SSSE3-NEXT: pxor %xmm8, %xmm8
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm8, %xmm9
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm7 = [2147483775,2147483775]
+; SSE2-SSSE3-NEXT: movdqa %xmm7, %xmm10
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm2, %xmm10
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm11 = xmm10[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm9, %xmm11
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm2 = xmm10[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm11, %xmm2
+; SSE2-SSSE3-NEXT: pand %xmm2, %xmm3
+; SSE2-SSSE3-NEXT: pandn %xmm4, %xmm2
+; SSE2-SSSE3-NEXT: por %xmm3, %xmm2
+; SSE2-SSSE3-NEXT: movdqa %xmm5, %xmm3
+; SSE2-SSSE3-NEXT: pxor %xmm1, %xmm3
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm3[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm8, %xmm9
+; SSE2-SSSE3-NEXT: movdqa %xmm7, %xmm10
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm3, %xmm10
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm11 = xmm10[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm9, %xmm11
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm10[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm11, %xmm3
+; SSE2-SSSE3-NEXT: pand %xmm3, %xmm5
+; SSE2-SSSE3-NEXT: pandn %xmm4, %xmm3
+; SSE2-SSSE3-NEXT: por %xmm5, %xmm3
+; SSE2-SSSE3-NEXT: movdqa %xmm6, %xmm5
+; SSE2-SSSE3-NEXT: pxor %xmm1, %xmm5
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm5[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm8, %xmm9
+; SSE2-SSSE3-NEXT: movdqa %xmm7, %xmm10
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm5, %xmm10
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm11 = xmm10[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm9, %xmm11
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm10[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm11, %xmm5
+; SSE2-SSSE3-NEXT: pand %xmm5, %xmm6
+; SSE2-SSSE3-NEXT: pandn %xmm4, %xmm5
+; SSE2-SSSE3-NEXT: por %xmm6, %xmm5
+; SSE2-SSSE3-NEXT: movdqa %xmm0, %xmm6
+; SSE2-SSSE3-NEXT: pxor %xmm1, %xmm6
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm6[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm8, %xmm9
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm6, %xmm7
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm6 = xmm7[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm9, %xmm6
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm8 = xmm7[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm6, %xmm8
+; SSE2-SSSE3-NEXT: pand %xmm8, %xmm0
+; SSE2-SSSE3-NEXT: pandn %xmm4, %xmm8
+; SSE2-SSSE3-NEXT: por %xmm0, %xmm8
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm4 = [18446744073709551488,18446744073709551488]
+; SSE2-SSSE3-NEXT: movdqa %xmm8, %xmm0
+; SSE2-SSSE3-NEXT: pxor %xmm1, %xmm0
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm0[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm6, %xmm6
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm6, %xmm9
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm7 = [18446744071562067840,18446744071562067840]
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm7, %xmm0
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm10 = xmm0[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm9, %xmm10
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm0[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm10, %xmm9
+; SSE2-SSSE3-NEXT: pand %xmm9, %xmm8
+; SSE2-SSSE3-NEXT: pandn %xmm4, %xmm9
+; SSE2-SSSE3-NEXT: por %xmm8, %xmm9
+; SSE2-SSSE3-NEXT: movdqa %xmm5, %xmm0
+; SSE2-SSSE3-NEXT: pxor %xmm1, %xmm0
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm8 = xmm0[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm6, %xmm8
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm7, %xmm0
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm10 = xmm0[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm8, %xmm10
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm10, %xmm0
+; SSE2-SSSE3-NEXT: pand %xmm0, %xmm5
+; SSE2-SSSE3-NEXT: pandn %xmm4, %xmm0
+; SSE2-SSSE3-NEXT: por %xmm5, %xmm0
+; SSE2-SSSE3-NEXT: packssdw %xmm9, %xmm0
+; SSE2-SSSE3-NEXT: movdqa %xmm3, %xmm5
+; SSE2-SSSE3-NEXT: pxor %xmm1, %xmm5
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm8 = xmm5[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm6, %xmm8
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm7, %xmm5
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm5[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm8, %xmm9
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm5[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm9, %xmm5
+; SSE2-SSSE3-NEXT: pand %xmm5, %xmm3
+; SSE2-SSSE3-NEXT: pandn %xmm4, %xmm5
+; SSE2-SSSE3-NEXT: por %xmm3, %xmm5
+; SSE2-SSSE3-NEXT: pxor %xmm2, %xmm1
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm1[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm6, %xmm3
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm7, %xmm1
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm6 = xmm1[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm3, %xmm6
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm1 = xmm1[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm6, %xmm1
+; SSE2-SSSE3-NEXT: pand %xmm1, %xmm2
+; SSE2-SSSE3-NEXT: pandn %xmm4, %xmm1
+; SSE2-SSSE3-NEXT: por %xmm2, %xmm1
+; SSE2-SSSE3-NEXT: packssdw %xmm5, %xmm1
+; SSE2-SSSE3-NEXT: packssdw %xmm1, %xmm0
+; SSE2-SSSE3-NEXT: packsswb %xmm0, %xmm0
+; SSE2-SSSE3-NEXT: retq
;
; SSE41-LABEL: trunc_ssat_v8i64_v8i8:
; SSE41: # %bb.0:
@@ -3745,241 +3082,123 @@ define <8 x i8> @trunc_ssat_v8i64_v8i8(ptr %p0) "min-legal-vector-width"="256" {
; TODO: The AVX1 codegen shows a missed opportunity to narrow blendv+logic to 128-bit.
define void @trunc_ssat_v8i64_v8i8_store(ptr %p0, ptr%p1) "min-legal-vector-width"="256" {
-; SSE2-LABEL: trunc_ssat_v8i64_v8i8_store:
-; SSE2: # %bb.0:
-; SSE2-NEXT: movdqa (%rdi), %xmm6
-; SSE2-NEXT: movdqa 16(%rdi), %xmm3
-; SSE2-NEXT: movdqa 32(%rdi), %xmm2
-; SSE2-NEXT: movdqa 48(%rdi), %xmm5
-; SSE2-NEXT: movdqa {{.*#+}} xmm4 = [127,127]
-; SSE2-NEXT: movdqa {{.*#+}} xmm0 = [2147483648,2147483648]
-; SSE2-NEXT: movdqa %xmm2, %xmm1
-; SSE2-NEXT: pxor %xmm0, %xmm1
-; SSE2-NEXT: pshufd {{.*#+}} xmm9 = xmm1[1,1,3,3]
-; SSE2-NEXT: pxor %xmm8, %xmm8
-; SSE2-NEXT: pcmpeqd %xmm8, %xmm9
-; SSE2-NEXT: movdqa {{.*#+}} xmm7 = [2147483775,2147483775]
-; SSE2-NEXT: movdqa %xmm7, %xmm10
-; SSE2-NEXT: pcmpgtd %xmm1, %xmm10
-; SSE2-NEXT: pshufd {{.*#+}} xmm11 = xmm10[0,0,2,2]
-; SSE2-NEXT: pand %xmm9, %xmm11
-; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm10[1,1,3,3]
-; SSE2-NEXT: por %xmm11, %xmm1
-; SSE2-NEXT: pand %xmm1, %xmm2
-; SSE2-NEXT: pandn %xmm4, %xmm1
-; SSE2-NEXT: por %xmm2, %xmm1
-; SSE2-NEXT: movdqa %xmm5, %xmm2
-; SSE2-NEXT: pxor %xmm0, %xmm2
-; SSE2-NEXT: pshufd {{.*#+}} xmm9 = xmm2[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm8, %xmm9
-; SSE2-NEXT: movdqa %xmm7, %xmm10
-; SSE2-NEXT: pcmpgtd %xmm2, %xmm10
-; SSE2-NEXT: pshufd {{.*#+}} xmm11 = xmm10[0,0,2,2]
-; SSE2-NEXT: pand %xmm9, %xmm11
-; SSE2-NEXT: pshufd {{.*#+}} xmm2 = xmm10[1,1,3,3]
-; SSE2-NEXT: por %xmm11, %xmm2
-; SSE2-NEXT: pand %xmm2, %xmm5
-; SSE2-NEXT: pandn %xmm4, %xmm2
-; SSE2-NEXT: por %xmm5, %xmm2
-; SSE2-NEXT: movdqa %xmm6, %xmm5
-; SSE2-NEXT: pxor %xmm0, %xmm5
-; SSE2-NEXT: pshufd {{.*#+}} xmm9 = xmm5[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm8, %xmm9
-; SSE2-NEXT: movdqa %xmm7, %xmm10
-; SSE2-NEXT: pcmpgtd %xmm5, %xmm10
-; SSE2-NEXT: pshufd {{.*#+}} xmm11 = xmm10[0,0,2,2]
-; SSE2-NEXT: pand %xmm9, %xmm11
-; SSE2-NEXT: pshufd {{.*#+}} xmm5 = xmm10[1,1,3,3]
-; SSE2-NEXT: por %xmm11, %xmm5
-; SSE2-NEXT: pand %xmm5, %xmm6
-; SSE2-NEXT: pandn %xmm4, %xmm5
-; SSE2-NEXT: por %xmm6, %xmm5
-; SSE2-NEXT: movdqa %xmm3, %xmm6
-; SSE2-NEXT: pxor %xmm0, %xmm6
-; SSE2-NEXT: pshufd {{.*#+}} xmm9 = xmm6[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm8, %xmm9
-; SSE2-NEXT: pcmpgtd %xmm6, %xmm7
-; SSE2-NEXT: pshufd {{.*#+}} xmm6 = xmm7[0,0,2,2]
-; SSE2-NEXT: pand %xmm9, %xmm6
-; SSE2-NEXT: pshufd {{.*#+}} xmm7 = xmm7[1,1,3,3]
-; SSE2-NEXT: por %xmm6, %xmm7
-; SSE2-NEXT: pand %xmm7, %xmm3
-; SSE2-NEXT: pandn %xmm4, %xmm7
-; SSE2-NEXT: por %xmm3, %xmm7
-; SSE2-NEXT: movdqa {{.*#+}} xmm3 = [18446744073709551488,18446744073709551488]
-; SSE2-NEXT: movdqa %xmm7, %xmm8
-; SSE2-NEXT: pxor %xmm0, %xmm8
-; SSE2-NEXT: pshufd {{.*#+}} xmm9 = xmm8[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm4, %xmm4
-; SSE2-NEXT: pcmpeqd %xmm4, %xmm9
-; SSE2-NEXT: movdqa {{.*#+}} xmm6 = [18446744071562067840,18446744071562067840]
-; SSE2-NEXT: pcmpgtd %xmm6, %xmm8
-; SSE2-NEXT: pshufd {{.*#+}} xmm10 = xmm8[0,0,2,2]
-; SSE2-NEXT: pand %xmm9, %xmm10
-; SSE2-NEXT: pshufd {{.*#+}} xmm8 = xmm8[1,1,3,3]
-; SSE2-NEXT: por %xmm10, %xmm8
-; SSE2-NEXT: pand %xmm8, %xmm7
-; SSE2-NEXT: pandn %xmm3, %xmm8
-; SSE2-NEXT: por %xmm7, %xmm8
-; SSE2-NEXT: movdqa %xmm5, %xmm7
-; SSE2-NEXT: pxor %xmm0, %xmm7
-; SSE2-NEXT: pshufd {{.*#+}} xmm9 = xmm7[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm4, %xmm9
-; SSE2-NEXT: pcmpgtd %xmm6, %xmm7
-; SSE2-NEXT: pshufd {{.*#+}} xmm10 = xmm7[0,0,2,2]
-; SSE2-NEXT: pand %xmm9, %xmm10
-; SSE2-NEXT: pshufd {{.*#+}} xmm7 = xmm7[1,1,3,3]
-; SSE2-NEXT: por %xmm10, %xmm7
-; SSE2-NEXT: pand %xmm7, %xmm5
-; SSE2-NEXT: pandn %xmm3, %xmm7
-; SSE2-NEXT: por %xmm5, %xmm7
-; SSE2-NEXT: packssdw %xmm8, %xmm7
-; SSE2-NEXT: movdqa %xmm2, %xmm5
-; SSE2-NEXT: pxor %xmm0, %xmm5
-; SSE2-NEXT: pshufd {{.*#+}} xmm8 = xmm5[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm4, %xmm8
-; SSE2-NEXT: pcmpgtd %xmm6, %xmm5
-; SSE2-NEXT: pshufd {{.*#+}} xmm9 = xmm5[0,0,2,2]
-; SSE2-NEXT: pand %xmm8, %xmm9
-; SSE2-NEXT: pshufd {{.*#+}} xmm5 = xmm5[1,1,3,3]
-; SSE2-NEXT: por %xmm9, %xmm5
-; SSE2-NEXT: pand %xmm5, %xmm2
-; SSE2-NEXT: pandn %xmm3, %xmm5
-; SSE2-NEXT: por %xmm2, %xmm5
-; SSE2-NEXT: pxor %xmm1, %xmm0
-; SSE2-NEXT: pshufd {{.*#+}} xmm2 = xmm0[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm4, %xmm2
-; SSE2-NEXT: pcmpgtd %xmm6, %xmm0
-; SSE2-NEXT: pshufd {{.*#+}} xmm4 = xmm0[0,0,2,2]
-; SSE2-NEXT: pand %xmm2, %xmm4
-; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,3,3]
-; SSE2-NEXT: por %xmm4, %xmm0
-; SSE2-NEXT: pand %xmm0, %xmm1
-; SSE2-NEXT: pandn %xmm3, %xmm0
-; SSE2-NEXT: por %xmm1, %xmm0
-; SSE2-NEXT: packssdw %xmm5, %xmm0
-; SSE2-NEXT: packssdw %xmm0, %xmm7
-; SSE2-NEXT: packsswb %xmm7, %xmm7
-; SSE2-NEXT: movq %xmm7, (%rsi)
-; SSE2-NEXT: retq
-;
-; SSSE3-LABEL: trunc_ssat_v8i64_v8i8_store:
-; SSSE3: # %bb.0:
-; SSSE3-NEXT: movdqa (%rdi), %xmm6
-; SSSE3-NEXT: movdqa 16(%rdi), %xmm3
-; SSSE3-NEXT: movdqa 32(%rdi), %xmm2
-; SSSE3-NEXT: movdqa 48(%rdi), %xmm5
-; SSSE3-NEXT: movdqa {{.*#+}} xmm4 = [127,127]
-; SSSE3-NEXT: movdqa {{.*#+}} xmm0 = [2147483648,2147483648]
-; SSSE3-NEXT: movdqa %xmm2, %xmm1
-; SSSE3-NEXT: pxor %xmm0, %xmm1
-; SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm1[1,1,3,3]
-; SSSE3-NEXT: pxor %xmm8, %xmm8
-; SSSE3-NEXT: pcmpeqd %xmm8, %xmm9
-; SSSE3-NEXT: movdqa {{.*#+}} xmm7 = [2147483775,2147483775]
-; SSSE3-NEXT: movdqa %xmm7, %xmm10
-; SSSE3-NEXT: pcmpgtd %xmm1, %xmm10
-; SSSE3-NEXT: pshufd {{.*#+}} xmm11 = xmm10[0,0,2,2]
-; SSSE3-NEXT: pand %xmm9, %xmm11
-; SSSE3-NEXT: pshufd {{.*#+}} xmm1 = xmm10[1,1,3,3]
-; SSSE3-NEXT: por %xmm11, %xmm1
-; SSSE3-NEXT: pand %xmm1, %xmm2
-; SSSE3-NEXT: pandn %xmm4, %xmm1
-; SSSE3-NEXT: por %xmm2, %xmm1
-; SSSE3-NEXT: movdqa %xmm5, %xmm2
-; SSSE3-NEXT: pxor %xmm0, %xmm2
-; SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm2[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm8, %xmm9
-; SSSE3-NEXT: movdqa %xmm7, %xmm10
-; SSSE3-NEXT: pcmpgtd %xmm2, %xmm10
-; SSSE3-NEXT: pshufd {{.*#+}} xmm11 = xmm10[0,0,2,2]
-; SSSE3-NEXT: pand %xmm9, %xmm11
-; SSSE3-NEXT: pshufd {{.*#+}} xmm2 = xmm10[1,1,3,3]
-; SSSE3-NEXT: por %xmm11, %xmm2
-; SSSE3-NEXT: pand %xmm2, %xmm5
-; SSSE3-NEXT: pandn %xmm4, %xmm2
-; SSSE3-NEXT: por %xmm5, %xmm2
-; SSSE3-NEXT: movdqa %xmm6, %xmm5
-; SSSE3-NEXT: pxor %xmm0, %xmm5
-; SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm5[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm8, %xmm9
-; SSSE3-NEXT: movdqa %xmm7, %xmm10
-; SSSE3-NEXT: pcmpgtd %xmm5, %xmm10
-; SSSE3-NEXT: pshufd {{.*#+}} xmm11 = xmm10[0,0,2,2]
-; SSSE3-NEXT: pand %xmm9, %xmm11
-; SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm10[1,1,3,3]
-; SSSE3-NEXT: por %xmm11, %xmm5
-; SSSE3-NEXT: pand %xmm5, %xmm6
-; SSSE3-NEXT: pandn %xmm4, %xmm5
-; SSSE3-NEXT: por %xmm6, %xmm5
-; SSSE3-NEXT: movdqa %xmm3, %xmm6
-; SSSE3-NEXT: pxor %xmm0, %xmm6
-; SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm6[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm8, %xmm9
-; SSSE3-NEXT: pcmpgtd %xmm6, %xmm7
-; SSSE3-NEXT: pshufd {{.*#+}} xmm6 = xmm7[0,0,2,2]
-; SSSE3-NEXT: pand %xmm9, %xmm6
-; SSSE3-NEXT: pshufd {{.*#+}} xmm7 = xmm7[1,1,3,3]
-; SSSE3-NEXT: por %xmm6, %xmm7
-; SSSE3-NEXT: pand %xmm7, %xmm3
-; SSSE3-NEXT: pandn %xmm4, %xmm7
-; SSSE3-NEXT: por %xmm3, %xmm7
-; SSSE3-NEXT: movdqa {{.*#+}} xmm3 = [18446744073709551488,18446744073709551488]
-; SSSE3-NEXT: movdqa %xmm7, %xmm8
-; SSSE3-NEXT: pxor %xmm0, %xmm8
-; SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm8[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm4, %xmm4
-; SSSE3-NEXT: pcmpeqd %xmm4, %xmm9
-; SSSE3-NEXT: movdqa {{.*#+}} xmm6 = [18446744071562067840,18446744071562067840]
-; SSSE3-NEXT: pcmpgtd %xmm6, %xmm8
-; SSSE3-NEXT: pshufd {{.*#+}} xmm10 = xmm8[0,0,2,2]
-; SSSE3-NEXT: pand %xmm9, %xmm10
-; SSSE3-NEXT: pshufd {{.*#+}} xmm8 = xmm8[1,1,3,3]
-; SSSE3-NEXT: por %xmm10, %xmm8
-; SSSE3-NEXT: pand %xmm8, %xmm7
-; SSSE3-NEXT: pandn %xmm3, %xmm8
-; SSSE3-NEXT: por %xmm7, %xmm8
-; SSSE3-NEXT: movdqa %xmm5, %xmm7
-; SSSE3-NEXT: pxor %xmm0, %xmm7
-; SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm7[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm4, %xmm9
-; SSSE3-NEXT: pcmpgtd %xmm6, %xmm7
-; SSSE3-NEXT: pshufd {{.*#+}} xmm10 = xmm7[0,0,2,2]
-; SSSE3-NEXT: pand %xmm9, %xmm10
-; SSSE3-NEXT: pshufd {{.*#+}} xmm7 = xmm7[1,1,3,3]
-; SSSE3-NEXT: por %xmm10, %xmm7
-; SSSE3-NEXT: pand %xmm7, %xmm5
-; SSSE3-NEXT: pandn %xmm3, %xmm7
-; SSSE3-NEXT: por %xmm5, %xmm7
-; SSSE3-NEXT: packssdw %xmm8, %xmm7
-; SSSE3-NEXT: movdqa %xmm2, %xmm5
-; SSSE3-NEXT: pxor %xmm0, %xmm5
-; SSSE3-NEXT: pshufd {{.*#+}} xmm8 = xmm5[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm4, %xmm8
-; SSSE3-NEXT: pcmpgtd %xmm6, %xmm5
-; SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm5[0,0,2,2]
-; SSSE3-NEXT: pand %xmm8, %xmm9
-; SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm5[1,1,3,3]
-; SSSE3-NEXT: por %xmm9, %xmm5
-; SSSE3-NEXT: pand %xmm5, %xmm2
-; SSSE3-NEXT: pandn %xmm3, %xmm5
-; SSSE3-NEXT: por %xmm2, %xmm5
-; SSSE3-NEXT: pxor %xmm1, %xmm0
-; SSSE3-NEXT: pshufd {{.*#+}} xmm2 = xmm0[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm4, %xmm2
-; SSSE3-NEXT: pcmpgtd %xmm6, %xmm0
-; SSSE3-NEXT: pshufd {{.*#+}} xmm4 = xmm0[0,0,2,2]
-; SSSE3-NEXT: pand %xmm2, %xmm4
-; SSSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,3,3]
-; SSSE3-NEXT: por %xmm4, %xmm0
-; SSSE3-NEXT: pand %xmm0, %xmm1
-; SSSE3-NEXT: pandn %xmm3, %xmm0
-; SSSE3-NEXT: por %xmm1, %xmm0
-; SSSE3-NEXT: packssdw %xmm5, %xmm0
-; SSSE3-NEXT: packssdw %xmm0, %xmm7
-; SSSE3-NEXT: packsswb %xmm7, %xmm7
-; SSSE3-NEXT: movq %xmm7, (%rsi)
-; SSSE3-NEXT: retq
+; SSE2-SSSE3-LABEL: trunc_ssat_v8i64_v8i8_store:
+; SSE2-SSSE3: # %bb.0:
+; SSE2-SSSE3-NEXT: movdqa (%rdi), %xmm6
+; SSE2-SSSE3-NEXT: movdqa 16(%rdi), %xmm3
+; SSE2-SSSE3-NEXT: movdqa 32(%rdi), %xmm2
+; SSE2-SSSE3-NEXT: movdqa 48(%rdi), %xmm5
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm4 = [127,127]
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm0 = [2147483648,2147483648]
+; SSE2-SSSE3-NEXT: movdqa %xmm2, %xmm1
+; SSE2-SSSE3-NEXT: pxor %xmm0, %xmm1
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm1[1,1,3,3]
+; SSE2-SSSE3-NEXT: pxor %xmm8, %xmm8
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm8, %xmm9
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm7 = [2147483775,2147483775]
+; SSE2-SSSE3-NEXT: movdqa %xmm7, %xmm10
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm1, %xmm10
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm11 = xmm10[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm9, %xmm11
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm1 = xmm10[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm11, %xmm1
+; SSE2-SSSE3-NEXT: pand %xmm1, %xmm2
+; SSE2-SSSE3-NEXT: pandn %xmm4, %xmm1
+; SSE2-SSSE3-NEXT: por %xmm2, %xmm1
+; SSE2-SSSE3-NEXT: movdqa %xmm5, %xmm2
+; SSE2-SSSE3-NEXT: pxor %xmm0, %xmm2
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm2[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm8, %xmm9
+; SSE2-SSSE3-NEXT: movdqa %xmm7, %xmm10
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm2, %xmm10
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm11 = xmm10[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm9, %xmm11
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm2 = xmm10[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm11, %xmm2
+; SSE2-SSSE3-NEXT: pand %xmm2, %xmm5
+; SSE2-SSSE3-NEXT: pandn %xmm4, %xmm2
+; SSE2-SSSE3-NEXT: por %xmm5, %xmm2
+; SSE2-SSSE3-NEXT: movdqa %xmm6, %xmm5
+; SSE2-SSSE3-NEXT: pxor %xmm0, %xmm5
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm5[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm8, %xmm9
+; SSE2-SSSE3-NEXT: movdqa %xmm7, %xmm10
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm5, %xmm10
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm11 = xmm10[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm9, %xmm11
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm10[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm11, %xmm5
+; SSE2-SSSE3-NEXT: pand %xmm5, %xmm6
+; SSE2-SSSE3-NEXT: pandn %xmm4, %xmm5
+; SSE2-SSSE3-NEXT: por %xmm6, %xmm5
+; SSE2-SSSE3-NEXT: movdqa %xmm3, %xmm6
+; SSE2-SSSE3-NEXT: pxor %xmm0, %xmm6
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm6[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm8, %xmm9
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm6, %xmm7
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm6 = xmm7[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm9, %xmm6
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm7 = xmm7[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm6, %xmm7
+; SSE2-SSSE3-NEXT: pand %xmm7, %xmm3
+; SSE2-SSSE3-NEXT: pandn %xmm4, %xmm7
+; SSE2-SSSE3-NEXT: por %xmm3, %xmm7
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm3 = [18446744073709551488,18446744073709551488]
+; SSE2-SSSE3-NEXT: movdqa %xmm7, %xmm8
+; SSE2-SSSE3-NEXT: pxor %xmm0, %xmm8
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm8[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm4, %xmm4
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm4, %xmm9
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm6 = [18446744071562067840,18446744071562067840]
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm6, %xmm8
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm10 = xmm8[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm9, %xmm10
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm8 = xmm8[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm10, %xmm8
+; SSE2-SSSE3-NEXT: pand %xmm8, %xmm7
+; SSE2-SSSE3-NEXT: pandn %xmm3, %xmm8
+; SSE2-SSSE3-NEXT: por %xmm7, %xmm8
+; SSE2-SSSE3-NEXT: movdqa %xmm5, %xmm7
+; SSE2-SSSE3-NEXT: pxor %xmm0, %xmm7
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm7[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm4, %xmm9
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm6, %xmm7
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm10 = xmm7[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm9, %xmm10
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm7 = xmm7[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm10, %xmm7
+; SSE2-SSSE3-NEXT: pand %xmm7, %xmm5
+; SSE2-SSSE3-NEXT: pandn %xmm3, %xmm7
+; SSE2-SSSE3-NEXT: por %xmm5, %xmm7
+; SSE2-SSSE3-NEXT: packssdw %xmm8, %xmm7
+; SSE2-SSSE3-NEXT: movdqa %xmm2, %xmm5
+; SSE2-SSSE3-NEXT: pxor %xmm0, %xmm5
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm8 = xmm5[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm4, %xmm8
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm6, %xmm5
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm9 = xmm5[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm8, %xmm9
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm5[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm9, %xmm5
+; SSE2-SSSE3-NEXT: pand %xmm5, %xmm2
+; SSE2-SSSE3-NEXT: pandn %xmm3, %xmm5
+; SSE2-SSSE3-NEXT: por %xmm2, %xmm5
+; SSE2-SSSE3-NEXT: pxor %xmm1, %xmm0
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm2 = xmm0[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm4, %xmm2
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm6, %xmm0
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm4 = xmm0[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm2, %xmm4
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm4, %xmm0
+; SSE2-SSSE3-NEXT: pand %xmm0, %xmm1
+; SSE2-SSSE3-NEXT: pandn %xmm3, %xmm0
+; SSE2-SSSE3-NEXT: por %xmm1, %xmm0
+; SSE2-SSSE3-NEXT: packssdw %xmm5, %xmm0
+; SSE2-SSSE3-NEXT: packssdw %xmm0, %xmm7
+; SSE2-SSSE3-NEXT: packsswb %xmm7, %xmm7
+; SSE2-SSSE3-NEXT: movq %xmm7, (%rsi)
+; SSE2-SSSE3-NEXT: retq
;
; SSE41-LABEL: trunc_ssat_v8i64_v8i8_store:
; SSE41: # %bb.0:
@@ -4163,453 +3382,229 @@ define void @trunc_ssat_v8i64_v8i8_store(ptr %p0, ptr%p1) "min-legal-vector-widt
}
define <16 x i8> @trunc_ssat_v16i64_v16i8(ptr %p0) "min-legal-vector-width"="256" {
-; SSE2-LABEL: trunc_ssat_v16i64_v16i8:
-; SSE2: # %bb.0:
-; SSE2-NEXT: movdqa (%rdi), %xmm8
-; SSE2-NEXT: movdqa 16(%rdi), %xmm0
-; SSE2-NEXT: movdqa 32(%rdi), %xmm12
-; SSE2-NEXT: movdqa 48(%rdi), %xmm11
-; SSE2-NEXT: movdqa 80(%rdi), %xmm7
-; SSE2-NEXT: movdqa 64(%rdi), %xmm5
-; SSE2-NEXT: movdqa 112(%rdi), %xmm4
-; SSE2-NEXT: movdqa 96(%rdi), %xmm3
-; SSE2-NEXT: movdqa {{.*#+}} xmm6 = [127,127]
-; SSE2-NEXT: movdqa {{.*#+}} xmm1 = [2147483648,2147483648]
-; SSE2-NEXT: movdqa %xmm3, %xmm2
-; SSE2-NEXT: pxor %xmm1, %xmm2
-; SSE2-NEXT: pshufd {{.*#+}} xmm13 = xmm2[1,1,3,3]
-; SSE2-NEXT: pxor %xmm10, %xmm10
-; SSE2-NEXT: pcmpeqd %xmm10, %xmm13
-; SSE2-NEXT: movdqa {{.*#+}} xmm9 = [2147483775,2147483775]
-; SSE2-NEXT: movdqa %xmm9, %xmm14
-; SSE2-NEXT: pcmpgtd %xmm2, %xmm14
-; SSE2-NEXT: pshufd {{.*#+}} xmm15 = xmm14[0,0,2,2]
-; SSE2-NEXT: pand %xmm13, %xmm15
-; SSE2-NEXT: pshufd {{.*#+}} xmm2 = xmm14[1,1,3,3]
-; SSE2-NEXT: por %xmm15, %xmm2
-; SSE2-NEXT: pand %xmm2, %xmm3
-; SSE2-NEXT: pandn %xmm6, %xmm2
-; SSE2-NEXT: por %xmm3, %xmm2
-; SSE2-NEXT: movdqa %xmm4, %xmm3
-; SSE2-NEXT: pxor %xmm1, %xmm3
-; SSE2-NEXT: pshufd {{.*#+}} xmm13 = xmm3[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm10, %xmm13
-; SSE2-NEXT: movdqa %xmm9, %xmm14
-; SSE2-NEXT: pcmpgtd %xmm3, %xmm14
-; SSE2-NEXT: pshufd {{.*#+}} xmm15 = xmm14[0,0,2,2]
-; SSE2-NEXT: pand %xmm13, %xmm15
-; SSE2-NEXT: pshufd {{.*#+}} xmm3 = xmm14[1,1,3,3]
-; SSE2-NEXT: por %xmm15, %xmm3
-; SSE2-NEXT: pand %xmm3, %xmm4
-; SSE2-NEXT: pandn %xmm6, %xmm3
-; SSE2-NEXT: por %xmm4, %xmm3
-; SSE2-NEXT: movdqa %xmm5, %xmm4
-; SSE2-NEXT: pxor %xmm1, %xmm4
-; SSE2-NEXT: pshufd {{.*#+}} xmm13 = xmm4[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm10, %xmm13
-; SSE2-NEXT: movdqa %xmm9, %xmm14
-; SSE2-NEXT: pcmpgtd %xmm4, %xmm14
-; SSE2-NEXT: pshufd {{.*#+}} xmm15 = xmm14[0,0,2,2]
-; SSE2-NEXT: pand %xmm13, %xmm15
-; SSE2-NEXT: pshufd {{.*#+}} xmm4 = xmm14[1,1,3,3]
-; SSE2-NEXT: por %xmm15, %xmm4
-; SSE2-NEXT: pand %xmm4, %xmm5
-; SSE2-NEXT: pandn %xmm6, %xmm4
-; SSE2-NEXT: por %xmm5, %xmm4
-; SSE2-NEXT: movdqa %xmm7, %xmm5
-; SSE2-NEXT: pxor %xmm1, %xmm5
-; SSE2-NEXT: pshufd {{.*#+}} xmm13 = xmm5[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm10, %xmm13
-; SSE2-NEXT: movdqa %xmm9, %xmm14
-; SSE2-NEXT: pcmpgtd %xmm5, %xmm14
-; SSE2-NEXT: pshufd {{.*#+}} xmm15 = xmm14[0,0,2,2]
-; SSE2-NEXT: pand %xmm13, %xmm15
-; SSE2-NEXT: pshufd {{.*#+}} xmm5 = xmm14[1,1,3,3]
-; SSE2-NEXT: por %xmm15, %xmm5
-; SSE2-NEXT: pand %xmm5, %xmm7
-; SSE2-NEXT: pandn %xmm6, %xmm5
-; SSE2-NEXT: por %xmm7, %xmm5
-; SSE2-NEXT: movdqa %xmm12, %xmm7
-; SSE2-NEXT: pxor %xmm1, %xmm7
-; SSE2-NEXT: pshufd {{.*#+}} xmm13 = xmm7[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm10, %xmm13
-; SSE2-NEXT: movdqa %xmm9, %xmm14
-; SSE2-NEXT: pcmpgtd %xmm7, %xmm14
-; SSE2-NEXT: pshufd {{.*#+}} xmm15 = xmm14[0,0,2,2]
-; SSE2-NEXT: pand %xmm13, %xmm15
-; SSE2-NEXT: pshufd {{.*#+}} xmm7 = xmm14[1,1,3,3]
-; SSE2-NEXT: por %xmm15, %xmm7
-; SSE2-NEXT: pand %xmm7, %xmm12
-; SSE2-NEXT: pandn %xmm6, %xmm7
-; SSE2-NEXT: por %xmm12, %xmm7
-; SSE2-NEXT: movdqa %xmm11, %xmm12
-; SSE2-NEXT: pxor %xmm1, %xmm12
-; SSE2-NEXT: pshufd {{.*#+}} xmm13 = xmm12[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm10, %xmm13
-; SSE2-NEXT: movdqa %xmm9, %xmm14
-; SSE2-NEXT: pcmpgtd %xmm12, %xmm14
-; SSE2-NEXT: pshufd {{.*#+}} xmm15 = xmm14[0,0,2,2]
-; SSE2-NEXT: pand %xmm13, %xmm15
-; SSE2-NEXT: pshufd {{.*#+}} xmm12 = xmm14[1,1,3,3]
-; SSE2-NEXT: por %xmm15, %xmm12
-; SSE2-NEXT: pand %xmm12, %xmm11
-; SSE2-NEXT: pandn %xmm6, %xmm12
-; SSE2-NEXT: por %xmm11, %xmm12
-; SSE2-NEXT: movdqa %xmm8, %xmm11
-; SSE2-NEXT: pxor %xmm1, %xmm11
-; SSE2-NEXT: pshufd {{.*#+}} xmm13 = xmm11[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm10, %xmm13
-; SSE2-NEXT: movdqa %xmm9, %xmm14
-; SSE2-NEXT: pcmpgtd %xmm11, %xmm14
-; SSE2-NEXT: pshufd {{.*#+}} xmm15 = xmm14[0,0,2,2]
-; SSE2-NEXT: pand %xmm13, %xmm15
-; SSE2-NEXT: pshufd {{.*#+}} xmm11 = xmm14[1,1,3,3]
-; SSE2-NEXT: por %xmm15, %xmm11
-; SSE2-NEXT: pand %xmm11, %xmm8
-; SSE2-NEXT: pandn %xmm6, %xmm11
-; SSE2-NEXT: por %xmm8, %xmm11
-; SSE2-NEXT: movdqa %xmm0, %xmm8
-; SSE2-NEXT: pxor %xmm1, %xmm8
-; SSE2-NEXT: pshufd {{.*#+}} xmm13 = xmm8[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm10, %xmm13
-; SSE2-NEXT: pcmpgtd %xmm8, %xmm9
-; SSE2-NEXT: pshufd {{.*#+}} xmm8 = xmm9[0,0,2,2]
-; SSE2-NEXT: pand %xmm13, %xmm8
-; SSE2-NEXT: pshufd {{.*#+}} xmm10 = xmm9[1,1,3,3]
-; SSE2-NEXT: por %xmm8, %xmm10
-; SSE2-NEXT: pand %xmm10, %xmm0
-; SSE2-NEXT: pandn %xmm6, %xmm10
-; SSE2-NEXT: por %xmm0, %xmm10
-; SSE2-NEXT: movdqa {{.*#+}} xmm6 = [18446744073709551488,18446744073709551488]
-; SSE2-NEXT: movdqa %xmm10, %xmm0
-; SSE2-NEXT: pxor %xmm1, %xmm0
-; SSE2-NEXT: pshufd {{.*#+}} xmm13 = xmm0[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm8, %xmm8
-; SSE2-NEXT: pcmpeqd %xmm8, %xmm13
-; SSE2-NEXT: movdqa {{.*#+}} xmm9 = [18446744071562067840,18446744071562067840]
-; SSE2-NEXT: pcmpgtd %xmm9, %xmm0
-; SSE2-NEXT: pshufd {{.*#+}} xmm14 = xmm0[0,0,2,2]
-; SSE2-NEXT: pand %xmm13, %xmm14
-; SSE2-NEXT: pshufd {{.*#+}} xmm13 = xmm0[1,1,3,3]
-; SSE2-NEXT: por %xmm14, %xmm13
-; SSE2-NEXT: pand %xmm13, %xmm10
-; SSE2-NEXT: pandn %xmm6, %xmm13
-; SSE2-NEXT: por %xmm10, %xmm13
-; SSE2-NEXT: movdqa %xmm11, %xmm0
-; SSE2-NEXT: pxor %xmm1, %xmm0
-; SSE2-NEXT: pshufd {{.*#+}} xmm10 = xmm0[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm8, %xmm10
-; SSE2-NEXT: pcmpgtd %xmm9, %xmm0
-; SSE2-NEXT: pshufd {{.*#+}} xmm14 = xmm0[0,0,2,2]
-; SSE2-NEXT: pand %xmm10, %xmm14
-; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,3,3]
-; SSE2-NEXT: por %xmm14, %xmm0
-; SSE2-NEXT: pand %xmm0, %xmm11
-; SSE2-NEXT: pandn %xmm6, %xmm0
-; SSE2-NEXT: por %xmm11, %xmm0
-; SSE2-NEXT: packssdw %xmm13, %xmm0
-; SSE2-NEXT: movdqa %xmm12, %xmm10
-; SSE2-NEXT: pxor %xmm1, %xmm10
-; SSE2-NEXT: pshufd {{.*#+}} xmm11 = xmm10[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm8, %xmm11
-; SSE2-NEXT: pcmpgtd %xmm9, %xmm10
-; SSE2-NEXT: pshufd {{.*#+}} xmm13 = xmm10[0,0,2,2]
-; SSE2-NEXT: pand %xmm11, %xmm13
-; SSE2-NEXT: pshufd {{.*#+}} xmm10 = xmm10[1,1,3,3]
-; SSE2-NEXT: por %xmm13, %xmm10
-; SSE2-NEXT: pand %xmm10, %xmm12
-; SSE2-NEXT: pandn %xmm6, %xmm10
-; SSE2-NEXT: por %xmm12, %xmm10
-; SSE2-NEXT: movdqa %xmm7, %xmm11
-; SSE2-NEXT: pxor %xmm1, %xmm11
-; SSE2-NEXT: pshufd {{.*#+}} xmm12 = xmm11[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm8, %xmm12
-; SSE2-NEXT: pcmpgtd %xmm9, %xmm11
-; SSE2-NEXT: pshufd {{.*#+}} xmm13 = xmm11[0,0,2,2]
-; SSE2-NEXT: pand %xmm12, %xmm13
-; SSE2-NEXT: pshufd {{.*#+}} xmm11 = xmm11[1,1,3,3]
-; SSE2-NEXT: por %xmm13, %xmm11
-; SSE2-NEXT: pand %xmm11, %xmm7
-; SSE2-NEXT: pandn %xmm6, %xmm11
-; SSE2-NEXT: por %xmm7, %xmm11
-; SSE2-NEXT: packssdw %xmm10, %xmm11
-; SSE2-NEXT: packssdw %xmm11, %xmm0
-; SSE2-NEXT: movdqa %xmm5, %xmm7
-; SSE2-NEXT: pxor %xmm1, %xmm7
-; SSE2-NEXT: pshufd {{.*#+}} xmm10 = xmm7[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm8, %xmm10
-; SSE2-NEXT: pcmpgtd %xmm9, %xmm7
-; SSE2-NEXT: pshufd {{.*#+}} xmm11 = xmm7[0,0,2,2]
-; SSE2-NEXT: pand %xmm10, %xmm11
-; SSE2-NEXT: pshufd {{.*#+}} xmm7 = xmm7[1,1,3,3]
-; SSE2-NEXT: por %xmm11, %xmm7
-; SSE2-NEXT: pand %xmm7, %xmm5
-; SSE2-NEXT: pandn %xmm6, %xmm7
-; SSE2-NEXT: por %xmm5, %xmm7
-; SSE2-NEXT: movdqa %xmm4, %xmm5
-; SSE2-NEXT: pxor %xmm1, %xmm5
-; SSE2-NEXT: pshufd {{.*#+}} xmm10 = xmm5[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm8, %xmm10
-; SSE2-NEXT: pcmpgtd %xmm9, %xmm5
-; SSE2-NEXT: pshufd {{.*#+}} xmm11 = xmm5[0,0,2,2]
-; SSE2-NEXT: pand %xmm10, %xmm11
-; SSE2-NEXT: pshufd {{.*#+}} xmm5 = xmm5[1,1,3,3]
-; SSE2-NEXT: por %xmm11, %xmm5
-; SSE2-NEXT: pand %xmm5, %xmm4
-; SSE2-NEXT: pandn %xmm6, %xmm5
-; SSE2-NEXT: por %xmm4, %xmm5
-; SSE2-NEXT: packssdw %xmm7, %xmm5
-; SSE2-NEXT: movdqa %xmm3, %xmm4
-; SSE2-NEXT: pxor %xmm1, %xmm4
-; SSE2-NEXT: pshufd {{.*#+}} xmm7 = xmm4[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm8, %xmm7
-; SSE2-NEXT: pcmpgtd %xmm9, %xmm4
-; SSE2-NEXT: pshufd {{.*#+}} xmm10 = xmm4[0,0,2,2]
-; SSE2-NEXT: pand %xmm7, %xmm10
-; SSE2-NEXT: pshufd {{.*#+}} xmm4 = xmm4[1,1,3,3]
-; SSE2-NEXT: por %xmm10, %xmm4
-; SSE2-NEXT: pand %xmm4, %xmm3
-; SSE2-NEXT: pandn %xmm6, %xmm4
-; SSE2-NEXT: por %xmm3, %xmm4
-; SSE2-NEXT: pxor %xmm2, %xmm1
-; SSE2-NEXT: pshufd {{.*#+}} xmm3 = xmm1[1,1,3,3]
-; SSE2-NEXT: pcmpeqd %xmm8, %xmm3
-; SSE2-NEXT: pcmpgtd %xmm9, %xmm1
-; SSE2-NEXT: pshufd {{.*#+}} xmm7 = xmm1[0,0,2,2]
-; SSE2-NEXT: pand %xmm3, %xmm7
-; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[1,1,3,3]
-; SSE2-NEXT: por %xmm7, %xmm1
-; SSE2-NEXT: pand %xmm1, %xmm2
-; SSE2-NEXT: pandn %xmm6, %xmm1
-; SSE2-NEXT: por %xmm2, %xmm1
-; SSE2-NEXT: packssdw %xmm4, %xmm1
-; SSE2-NEXT: packssdw %xmm1, %xmm5
-; SSE2-NEXT: packsswb %xmm5, %xmm0
-; SSE2-NEXT: retq
-;
-; SSSE3-LABEL: trunc_ssat_v16i64_v16i8:
-; SSSE3: # %bb.0:
-; SSSE3-NEXT: movdqa (%rdi), %xmm8
-; SSSE3-NEXT: movdqa 16(%rdi), %xmm0
-; SSSE3-NEXT: movdqa 32(%rdi), %xmm12
-; SSSE3-NEXT: movdqa 48(%rdi), %xmm11
-; SSSE3-NEXT: movdqa 80(%rdi), %xmm7
-; SSSE3-NEXT: movdqa 64(%rdi), %xmm5
-; SSSE3-NEXT: movdqa 112(%rdi), %xmm4
-; SSSE3-NEXT: movdqa 96(%rdi), %xmm3
-; SSSE3-NEXT: movdqa {{.*#+}} xmm6 = [127,127]
-; SSSE3-NEXT: movdqa {{.*#+}} xmm1 = [2147483648,2147483648]
-; SSSE3-NEXT: movdqa %xmm3, %xmm2
-; SSSE3-NEXT: pxor %xmm1, %xmm2
-; SSSE3-NEXT: pshufd {{.*#+}} xmm13 = xmm2[1,1,3,3]
-; SSSE3-NEXT: pxor %xmm10, %xmm10
-; SSSE3-NEXT: pcmpeqd %xmm10, %xmm13
-; SSSE3-NEXT: movdqa {{.*#+}} xmm9 = [2147483775,2147483775]
-; SSSE3-NEXT: movdqa %xmm9, %xmm14
-; SSSE3-NEXT: pcmpgtd %xmm2, %xmm14
-; SSSE3-NEXT: pshufd {{.*#+}} xmm15 = xmm14[0,0,2,2]
-; SSSE3-NEXT: pand %xmm13, %xmm15
-; SSSE3-NEXT: pshufd {{.*#+}} xmm2 = xmm14[1,1,3,3]
-; SSSE3-NEXT: por %xmm15, %xmm2
-; SSSE3-NEXT: pand %xmm2, %xmm3
-; SSSE3-NEXT: pandn %xmm6, %xmm2
-; SSSE3-NEXT: por %xmm3, %xmm2
-; SSSE3-NEXT: movdqa %xmm4, %xmm3
-; SSSE3-NEXT: pxor %xmm1, %xmm3
-; SSSE3-NEXT: pshufd {{.*#+}} xmm13 = xmm3[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm10, %xmm13
-; SSSE3-NEXT: movdqa %xmm9, %xmm14
-; SSSE3-NEXT: pcmpgtd %xmm3, %xmm14
-; SSSE3-NEXT: pshufd {{.*#+}} xmm15 = xmm14[0,0,2,2]
-; SSSE3-NEXT: pand %xmm13, %xmm15
-; SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm14[1,1,3,3]
-; SSSE3-NEXT: por %xmm15, %xmm3
-; SSSE3-NEXT: pand %xmm3, %xmm4
-; SSSE3-NEXT: pandn %xmm6, %xmm3
-; SSSE3-NEXT: por %xmm4, %xmm3
-; SSSE3-NEXT: movdqa %xmm5, %xmm4
-; SSSE3-NEXT: pxor %xmm1, %xmm4
-; SSSE3-NEXT: pshufd {{.*#+}} xmm13 = xmm4[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm10, %xmm13
-; SSSE3-NEXT: movdqa %xmm9, %xmm14
-; SSSE3-NEXT: pcmpgtd %xmm4, %xmm14
-; SSSE3-NEXT: pshufd {{.*#+}} xmm15 = xmm14[0,0,2,2]
-; SSSE3-NEXT: pand %xmm13, %xmm15
-; SSSE3-NEXT: pshufd {{.*#+}} xmm4 = xmm14[1,1,3,3]
-; SSSE3-NEXT: por %xmm15, %xmm4
-; SSSE3-NEXT: pand %xmm4, %xmm5
-; SSSE3-NEXT: pandn %xmm6, %xmm4
-; SSSE3-NEXT: por %xmm5, %xmm4
-; SSSE3-NEXT: movdqa %xmm7, %xmm5
-; SSSE3-NEXT: pxor %xmm1, %xmm5
-; SSSE3-NEXT: pshufd {{.*#+}} xmm13 = xmm5[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm10, %xmm13
-; SSSE3-NEXT: movdqa %xmm9, %xmm14
-; SSSE3-NEXT: pcmpgtd %xmm5, %xmm14
-; SSSE3-NEXT: pshufd {{.*#+}} xmm15 = xmm14[0,0,2,2]
-; SSSE3-NEXT: pand %xmm13, %xmm15
-; SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm14[1,1,3,3]
-; SSSE3-NEXT: por %xmm15, %xmm5
-; SSSE3-NEXT: pand %xmm5, %xmm7
-; SSSE3-NEXT: pandn %xmm6, %xmm5
-; SSSE3-NEXT: por %xmm7, %xmm5
-; SSSE3-NEXT: movdqa %xmm12, %xmm7
-; SSSE3-NEXT: pxor %xmm1, %xmm7
-; SSSE3-NEXT: pshufd {{.*#+}} xmm13 = xmm7[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm10, %xmm13
-; SSSE3-NEXT: movdqa %xmm9, %xmm14
-; SSSE3-NEXT: pcmpgtd %xmm7, %xmm14
-; SSSE3-NEXT: pshufd {{.*#+}} xmm15 = xmm14[0,0,2,2]
-; SSSE3-NEXT: pand %xmm13, %xmm15
-; SSSE3-NEXT: pshufd {{.*#+}} xmm7 = xmm14[1,1,3,3]
-; SSSE3-NEXT: por %xmm15, %xmm7
-; SSSE3-NEXT: pand %xmm7, %xmm12
-; SSSE3-NEXT: pandn %xmm6, %xmm7
-; SSSE3-NEXT: por %xmm12, %xmm7
-; SSSE3-NEXT: movdqa %xmm11, %xmm12
-; SSSE3-NEXT: pxor %xmm1, %xmm12
-; SSSE3-NEXT: pshufd {{.*#+}} xmm13 = xmm12[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm10, %xmm13
-; SSSE3-NEXT: movdqa %xmm9, %xmm14
-; SSSE3-NEXT: pcmpgtd %xmm12, %xmm14
-; SSSE3-NEXT: pshufd {{.*#+}} xmm15 = xmm14[0,0,2,2]
-; SSSE3-NEXT: pand %xmm13, %xmm15
-; SSSE3-NEXT: pshufd {{.*#+}} xmm12 = xmm14[1,1,3,3]
-; SSSE3-NEXT: por %xmm15, %xmm12
-; SSSE3-NEXT: pand %xmm12, %xmm11
-; SSSE3-NEXT: pandn %xmm6, %xmm12
-; SSSE3-NEXT: por %xmm11, %xmm12
-; SSSE3-NEXT: movdqa %xmm8, %xmm11
-; SSSE3-NEXT: pxor %xmm1, %xmm11
-; SSSE3-NEXT: pshufd {{.*#+}} xmm13 = xmm11[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm10, %xmm13
-; SSSE3-NEXT: movdqa %xmm9, %xmm14
-; SSSE3-NEXT: pcmpgtd %xmm11, %xmm14
-; SSSE3-NEXT: pshufd {{.*#+}} xmm15 = xmm14[0,0,2,2]
-; SSSE3-NEXT: pand %xmm13, %xmm15
-; SSSE3-NEXT: pshufd {{.*#+}} xmm11 = xmm14[1,1,3,3]
-; SSSE3-NEXT: por %xmm15, %xmm11
-; SSSE3-NEXT: pand %xmm11, %xmm8
-; SSSE3-NEXT: pandn %xmm6, %xmm11
-; SSSE3-NEXT: por %xmm8, %xmm11
-; SSSE3-NEXT: movdqa %xmm0, %xmm8
-; SSSE3-NEXT: pxor %xmm1, %xmm8
-; SSSE3-NEXT: pshufd {{.*#+}} xmm13 = xmm8[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm10, %xmm13
-; SSSE3-NEXT: pcmpgtd %xmm8, %xmm9
-; SSSE3-NEXT: pshufd {{.*#+}} xmm8 = xmm9[0,0,2,2]
-; SSSE3-NEXT: pand %xmm13, %xmm8
-; SSSE3-NEXT: pshufd {{.*#+}} xmm10 = xmm9[1,1,3,3]
-; SSSE3-NEXT: por %xmm8, %xmm10
-; SSSE3-NEXT: pand %xmm10, %xmm0
-; SSSE3-NEXT: pandn %xmm6, %xmm10
-; SSSE3-NEXT: por %xmm0, %xmm10
-; SSSE3-NEXT: movdqa {{.*#+}} xmm6 = [18446744073709551488,18446744073709551488]
-; SSSE3-NEXT: movdqa %xmm10, %xmm0
-; SSSE3-NEXT: pxor %xmm1, %xmm0
-; SSSE3-NEXT: pshufd {{.*#+}} xmm13 = xmm0[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm8, %xmm8
-; SSSE3-NEXT: pcmpeqd %xmm8, %xmm13
-; SSSE3-NEXT: movdqa {{.*#+}} xmm9 = [18446744071562067840,18446744071562067840]
-; SSSE3-NEXT: pcmpgtd %xmm9, %xmm0
-; SSSE3-NEXT: pshufd {{.*#+}} xmm14 = xmm0[0,0,2,2]
-; SSSE3-NEXT: pand %xmm13, %xmm14
-; SSSE3-NEXT: pshufd {{.*#+}} xmm13 = xmm0[1,1,3,3]
-; SSSE3-NEXT: por %xmm14, %xmm13
-; SSSE3-NEXT: pand %xmm13, %xmm10
-; SSSE3-NEXT: pandn %xmm6, %xmm13
-; SSSE3-NEXT: por %xmm10, %xmm13
-; SSSE3-NEXT: movdqa %xmm11, %xmm0
-; SSSE3-NEXT: pxor %xmm1, %xmm0
-; SSSE3-NEXT: pshufd {{.*#+}} xmm10 = xmm0[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm8, %xmm10
-; SSSE3-NEXT: pcmpgtd %xmm9, %xmm0
-; SSSE3-NEXT: pshufd {{.*#+}} xmm14 = xmm0[0,0,2,2]
-; SSSE3-NEXT: pand %xmm10, %xmm14
-; SSSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,3,3]
-; SSSE3-NEXT: por %xmm14, %xmm0
-; SSSE3-NEXT: pand %xmm0, %xmm11
-; SSSE3-NEXT: pandn %xmm6, %xmm0
-; SSSE3-NEXT: por %xmm11, %xmm0
-; SSSE3-NEXT: packssdw %xmm13, %xmm0
-; SSSE3-NEXT: movdqa %xmm12, %xmm10
-; SSSE3-NEXT: pxor %xmm1, %xmm10
-; SSSE3-NEXT: pshufd {{.*#+}} xmm11 = xmm10[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm8, %xmm11
-; SSSE3-NEXT: pcmpgtd %xmm9, %xmm10
-; SSSE3-NEXT: pshufd {{.*#+}} xmm13 = xmm10[0,0,2,2]
-; SSSE3-NEXT: pand %xmm11, %xmm13
-; SSSE3-NEXT: pshufd {{.*#+}} xmm10 = xmm10[1,1,3,3]
-; SSSE3-NEXT: por %xmm13, %xmm10
-; SSSE3-NEXT: pand %xmm10, %xmm12
-; SSSE3-NEXT: pandn %xmm6, %xmm10
-; SSSE3-NEXT: por %xmm12, %xmm10
-; SSSE3-NEXT: movdqa %xmm7, %xmm11
-; SSSE3-NEXT: pxor %xmm1, %xmm11
-; SSSE3-NEXT: pshufd {{.*#+}} xmm12 = xmm11[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm8, %xmm12
-; SSSE3-NEXT: pcmpgtd %xmm9, %xmm11
-; SSSE3-NEXT: pshufd {{.*#+}} xmm13 = xmm11[0,0,2,2]
-; SSSE3-NEXT: pand %xmm12, %xmm13
-; SSSE3-NEXT: pshufd {{.*#+}} xmm11 = xmm11[1,1,3,3]
-; SSSE3-NEXT: por %xmm13, %xmm11
-; SSSE3-NEXT: pand %xmm11, %xmm7
-; SSSE3-NEXT: pandn %xmm6, %xmm11
-; SSSE3-NEXT: por %xmm7, %xmm11
-; SSSE3-NEXT: packssdw %xmm10, %xmm11
-; SSSE3-NEXT: packssdw %xmm11, %xmm0
-; SSSE3-NEXT: movdqa %xmm5, %xmm7
-; SSSE3-NEXT: pxor %xmm1, %xmm7
-; SSSE3-NEXT: pshufd {{.*#+}} xmm10 = xmm7[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm8, %xmm10
-; SSSE3-NEXT: pcmpgtd %xmm9, %xmm7
-; SSSE3-NEXT: pshufd {{.*#+}} xmm11 = xmm7[0,0,2,2]
-; SSSE3-NEXT: pand %xmm10, %xmm11
-; SSSE3-NEXT: pshufd {{.*#+}} xmm7 = xmm7[1,1,3,3]
-; SSSE3-NEXT: por %xmm11, %xmm7
-; SSSE3-NEXT: pand %xmm7, %xmm5
-; SSSE3-NEXT: pandn %xmm6, %xmm7
-; SSSE3-NEXT: por %xmm5, %xmm7
-; SSSE3-NEXT: movdqa %xmm4, %xmm5
-; SSSE3-NEXT: pxor %xmm1, %xmm5
-; SSSE3-NEXT: pshufd {{.*#+}} xmm10 = xmm5[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm8, %xmm10
-; SSSE3-NEXT: pcmpgtd %xmm9, %xmm5
-; SSSE3-NEXT: pshufd {{.*#+}} xmm11 = xmm5[0,0,2,2]
-; SSSE3-NEXT: pand %xmm10, %xmm11
-; SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm5[1,1,3,3]
-; SSSE3-NEXT: por %xmm11, %xmm5
-; SSSE3-NEXT: pand %xmm5, %xmm4
-; SSSE3-NEXT: pandn %xmm6, %xmm5
-; SSSE3-NEXT: por %xmm4, %xmm5
-; SSSE3-NEXT: packssdw %xmm7, %xmm5
-; SSSE3-NEXT: movdqa %xmm3, %xmm4
-; SSSE3-NEXT: pxor %xmm1, %xmm4
-; SSSE3-NEXT: pshufd {{.*#+}} xmm7 = xmm4[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm8, %xmm7
-; SSSE3-NEXT: pcmpgtd %xmm9, %xmm4
-; SSSE3-NEXT: pshufd {{.*#+}} xmm10 = xmm4[0,0,2,2]
-; SSSE3-NEXT: pand %xmm7, %xmm10
-; SSSE3-NEXT: pshufd {{.*#+}} xmm4 = xmm4[1,1,3,3]
-; SSSE3-NEXT: por %xmm10, %xmm4
-; SSSE3-NEXT: pand %xmm4, %xmm3
-; SSSE3-NEXT: pandn %xmm6, %xmm4
-; SSSE3-NEXT: por %xmm3, %xmm4
-; SSSE3-NEXT: pxor %xmm2, %xmm1
-; SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm1[1,1,3,3]
-; SSSE3-NEXT: pcmpeqd %xmm8, %xmm3
-; SSSE3-NEXT: pcmpgtd %xmm9, %xmm1
-; SSSE3-NEXT: pshufd {{.*#+}} xmm7 = xmm1[0,0,2,2]
-; SSSE3-NEXT: pand %xmm3, %xmm7
-; SSSE3-NEXT: pshufd {{.*#+}} xmm1 = xmm1[1,1,3,3]
-; SSSE3-NEXT: por %xmm7, %xmm1
-; SSSE3-NEXT: pand %xmm1, %xmm2
-; SSSE3-NEXT: pandn %xmm6, %xmm1
-; SSSE3-NEXT: por %xmm2, %xmm1
-; SSSE3-NEXT: packssdw %xmm4, %xmm1
-; SSSE3-NEXT: packssdw %xmm1, %xmm5
-; SSSE3-NEXT: packsswb %xmm5, %xmm0
-; SSSE3-NEXT: retq
+; SSE2-SSSE3-LABEL: trunc_ssat_v16i64_v16i8:
+; SSE2-SSSE3: # %bb.0:
+; SSE2-SSSE3-NEXT: movdqa (%rdi), %xmm8
+; SSE2-SSSE3-NEXT: movdqa 16(%rdi), %xmm0
+; SSE2-SSSE3-NEXT: movdqa 32(%rdi), %xmm12
+; SSE2-SSSE3-NEXT: movdqa 48(%rdi), %xmm11
+; SSE2-SSSE3-NEXT: movdqa 80(%rdi), %xmm7
+; SSE2-SSSE3-NEXT: movdqa 64(%rdi), %xmm5
+; SSE2-SSSE3-NEXT: movdqa 112(%rdi), %xmm4
+; SSE2-SSSE3-NEXT: movdqa 96(%rdi), %xmm3
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm6 = [127,127]
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm1 = [2147483648,2147483648]
+; SSE2-SSSE3-NEXT: movdqa %xmm3, %xmm2
+; SSE2-SSSE3-NEXT: pxor %xmm1, %xmm2
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm13 = xmm2[1,1,3,3]
+; SSE2-SSSE3-NEXT: pxor %xmm10, %xmm10
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm10, %xmm13
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm9 = [2147483775,2147483775]
+; SSE2-SSSE3-NEXT: movdqa %xmm9, %xmm14
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm2, %xmm14
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm15 = xmm14[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm13, %xmm15
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm2 = xmm14[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm15, %xmm2
+; SSE2-SSSE3-NEXT: pand %xmm2, %xmm3
+; SSE2-SSSE3-NEXT: pandn %xmm6, %xmm2
+; SSE2-SSSE3-NEXT: por %xmm3, %xmm2
+; SSE2-SSSE3-NEXT: movdqa %xmm4, %xmm3
+; SSE2-SSSE3-NEXT: pxor %xmm1, %xmm3
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm13 = xmm3[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm10, %xmm13
+; SSE2-SSSE3-NEXT: movdqa %xmm9, %xmm14
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm3, %xmm14
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm15 = xmm14[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm13, %xmm15
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm14[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm15, %xmm3
+; SSE2-SSSE3-NEXT: pand %xmm3, %xmm4
+; SSE2-SSSE3-NEXT: pandn %xmm6, %xmm3
+; SSE2-SSSE3-NEXT: por %xmm4, %xmm3
+; SSE2-SSSE3-NEXT: movdqa %xmm5, %xmm4
+; SSE2-SSSE3-NEXT: pxor %xmm1, %xmm4
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm13 = xmm4[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm10, %xmm13
+; SSE2-SSSE3-NEXT: movdqa %xmm9, %xmm14
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm4, %xmm14
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm15 = xmm14[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm13, %xmm15
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm4 = xmm14[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm15, %xmm4
+; SSE2-SSSE3-NEXT: pand %xmm4, %xmm5
+; SSE2-SSSE3-NEXT: pandn %xmm6, %xmm4
+; SSE2-SSSE3-NEXT: por %xmm5, %xmm4
+; SSE2-SSSE3-NEXT: movdqa %xmm7, %xmm5
+; SSE2-SSSE3-NEXT: pxor %xmm1, %xmm5
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm13 = xmm5[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm10, %xmm13
+; SSE2-SSSE3-NEXT: movdqa %xmm9, %xmm14
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm5, %xmm14
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm15 = xmm14[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm13, %xmm15
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm14[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm15, %xmm5
+; SSE2-SSSE3-NEXT: pand %xmm5, %xmm7
+; SSE2-SSSE3-NEXT: pandn %xmm6, %xmm5
+; SSE2-SSSE3-NEXT: por %xmm7, %xmm5
+; SSE2-SSSE3-NEXT: movdqa %xmm12, %xmm7
+; SSE2-SSSE3-NEXT: pxor %xmm1, %xmm7
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm13 = xmm7[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm10, %xmm13
+; SSE2-SSSE3-NEXT: movdqa %xmm9, %xmm14
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm7, %xmm14
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm15 = xmm14[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm13, %xmm15
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm7 = xmm14[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm15, %xmm7
+; SSE2-SSSE3-NEXT: pand %xmm7, %xmm12
+; SSE2-SSSE3-NEXT: pandn %xmm6, %xmm7
+; SSE2-SSSE3-NEXT: por %xmm12, %xmm7
+; SSE2-SSSE3-NEXT: movdqa %xmm11, %xmm12
+; SSE2-SSSE3-NEXT: pxor %xmm1, %xmm12
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm13 = xmm12[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm10, %xmm13
+; SSE2-SSSE3-NEXT: movdqa %xmm9, %xmm14
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm12, %xmm14
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm15 = xmm14[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm13, %xmm15
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm12 = xmm14[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm15, %xmm12
+; SSE2-SSSE3-NEXT: pand %xmm12, %xmm11
+; SSE2-SSSE3-NEXT: pandn %xmm6, %xmm12
+; SSE2-SSSE3-NEXT: por %xmm11, %xmm12
+; SSE2-SSSE3-NEXT: movdqa %xmm8, %xmm11
+; SSE2-SSSE3-NEXT: pxor %xmm1, %xmm11
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm13 = xmm11[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm10, %xmm13
+; SSE2-SSSE3-NEXT: movdqa %xmm9, %xmm14
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm11, %xmm14
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm15 = xmm14[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm13, %xmm15
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm11 = xmm14[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm15, %xmm11
+; SSE2-SSSE3-NEXT: pand %xmm11, %xmm8
+; SSE2-SSSE3-NEXT: pandn %xmm6, %xmm11
+; SSE2-SSSE3-NEXT: por %xmm8, %xmm11
+; SSE2-SSSE3-NEXT: movdqa %xmm0, %xmm8
+; SSE2-SSSE3-NEXT: pxor %xmm1, %xmm8
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm13 = xmm8[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm10, %xmm13
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm8, %xmm9
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm8 = xmm9[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm13, %xmm8
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm10 = xmm9[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm8, %xmm10
+; SSE2-SSSE3-NEXT: pand %xmm10, %xmm0
+; SSE2-SSSE3-NEXT: pandn %xmm6, %xmm10
+; SSE2-SSSE3-NEXT: por %xmm0, %xmm10
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm6 = [18446744073709551488,18446744073709551488]
+; SSE2-SSSE3-NEXT: movdqa %xmm10, %xmm0
+; SSE2-SSSE3-NEXT: pxor %xmm1, %xmm0
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm13 = xmm0[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm8, %xmm8
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm8, %xmm13
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm9 = [18446744071562067840,18446744071562067840]
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm9, %xmm0
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm14 = xmm0[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm13, %xmm14
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm13 = xmm0[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm14, %xmm13
+; SSE2-SSSE3-NEXT: pand %xmm13, %xmm10
+; SSE2-SSSE3-NEXT: pandn %xmm6, %xmm13
+; SSE2-SSSE3-NEXT: por %xmm10, %xmm13
+; SSE2-SSSE3-NEXT: movdqa %xmm11, %xmm0
+; SSE2-SSSE3-NEXT: pxor %xmm1, %xmm0
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm10 = xmm0[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm8, %xmm10
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm9, %xmm0
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm14 = xmm0[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm10, %xmm14
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm14, %xmm0
+; SSE2-SSSE3-NEXT: pand %xmm0, %xmm11
+; SSE2-SSSE3-NEXT: pandn %xmm6, %xmm0
+; SSE2-SSSE3-NEXT: por %xmm11, %xmm0
+; SSE2-SSSE3-NEXT: packssdw %xmm13, %xmm0
+; SSE2-SSSE3-NEXT: movdqa %xmm12, %xmm10
+; SSE2-SSSE3-NEXT: pxor %xmm1, %xmm10
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm11 = xmm10[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm8, %xmm11
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm9, %xmm10
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm13 = xmm10[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm11, %xmm13
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm10 = xmm10[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm13, %xmm10
+; SSE2-SSSE3-NEXT: pand %xmm10, %xmm12
+; SSE2-SSSE3-NEXT: pandn %xmm6, %xmm10
+; SSE2-SSSE3-NEXT: por %xmm12, %xmm10
+; SSE2-SSSE3-NEXT: movdqa %xmm7, %xmm11
+; SSE2-SSSE3-NEXT: pxor %xmm1, %xmm11
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm12 = xmm11[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm8, %xmm12
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm9, %xmm11
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm13 = xmm11[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm12, %xmm13
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm11 = xmm11[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm13, %xmm11
+; SSE2-SSSE3-NEXT: pand %xmm11, %xmm7
+; SSE2-SSSE3-NEXT: pandn %xmm6, %xmm11
+; SSE2-SSSE3-NEXT: por %xmm7, %xmm11
+; SSE2-SSSE3-NEXT: packssdw %xmm10, %xmm11
+; SSE2-SSSE3-NEXT: packssdw %xmm11, %xmm0
+; SSE2-SSSE3-NEXT: movdqa %xmm5, %xmm7
+; SSE2-SSSE3-NEXT: pxor %xmm1, %xmm7
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm10 = xmm7[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm8, %xmm10
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm9, %xmm7
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm11 = xmm7[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm10, %xmm11
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm7 = xmm7[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm11, %xmm7
+; SSE2-SSSE3-NEXT: pand %xmm7, %xmm5
+; SSE2-SSSE3-NEXT: pandn %xmm6, %xmm7
+; SSE2-SSSE3-NEXT: por %xmm5, %xmm7
+; SSE2-SSSE3-NEXT: movdqa %xmm4, %xmm5
+; SSE2-SSSE3-NEXT: pxor %xmm1, %xmm5
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm10 = xmm5[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm8, %xmm10
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm9, %xmm5
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm11 = xmm5[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm10, %xmm11
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm5 = xmm5[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm11, %xmm5
+; SSE2-SSSE3-NEXT: pand %xmm5, %xmm4
+; SSE2-SSSE3-NEXT: pandn %xmm6, %xmm5
+; SSE2-SSSE3-NEXT: por %xmm4, %xmm5
+; SSE2-SSSE3-NEXT: packssdw %xmm7, %xmm5
+; SSE2-SSSE3-NEXT: movdqa %xmm3, %xmm4
+; SSE2-SSSE3-NEXT: pxor %xmm1, %xmm4
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm7 = xmm4[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm8, %xmm7
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm9, %xmm4
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm10 = xmm4[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm7, %xmm10
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm4 = xmm4[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm10, %xmm4
+; SSE2-SSSE3-NEXT: pand %xmm4, %xmm3
+; SSE2-SSSE3-NEXT: pandn %xmm6, %xmm4
+; SSE2-SSSE3-NEXT: por %xmm3, %xmm4
+; SSE2-SSSE3-NEXT: pxor %xmm2, %xmm1
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm1[1,1,3,3]
+; SSE2-SSSE3-NEXT: pcmpeqd %xmm8, %xmm3
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm9, %xmm1
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm7 = xmm1[0,0,2,2]
+; SSE2-SSSE3-NEXT: pand %xmm3, %xmm7
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm1 = xmm1[1,1,3,3]
+; SSE2-SSSE3-NEXT: por %xmm7, %xmm1
+; SSE2-SSSE3-NEXT: pand %xmm1, %xmm2
+; SSE2-SSSE3-NEXT: pandn %xmm6, %xmm1
+; SSE2-SSSE3-NEXT: por %xmm2, %xmm1
+; SSE2-SSSE3-NEXT: packssdw %xmm4, %xmm1
+; SSE2-SSSE3-NEXT: packssdw %xmm1, %xmm5
+; SSE2-SSSE3-NEXT: packsswb %xmm5, %xmm0
+; SSE2-SSSE3-NEXT: retq
;
; SSE41-LABEL: trunc_ssat_v16i64_v16i8:
; SSE41: # %bb.0:
@@ -5654,269 +4649,137 @@ define <32 x i8> @trunc_ssat_v32i32_v32i8(ptr %p0) "min-legal-vector-width"="256
; This used to crash with avx512 due because we were missing a check for
; unsupported element types like i24.
define void @trunc_ssat_v16i32_v16i24(<16 x i32> %x, ptr %y) nounwind {
-; SSE2-LABEL: trunc_ssat_v16i32_v16i24:
-; SSE2: # %bb.0:
-; SSE2-NEXT: pushq %rbp
-; SSE2-NEXT: pushq %r15
-; SSE2-NEXT: pushq %r14
-; SSE2-NEXT: pushq %r12
-; SSE2-NEXT: pushq %rbx
-; SSE2-NEXT: movdqa {{.*#+}} xmm5 = [8388607,8388607,8388607,8388607]
-; SSE2-NEXT: movdqa %xmm5, %xmm4
-; SSE2-NEXT: pcmpgtd %xmm3, %xmm4
-; SSE2-NEXT: pand %xmm4, %xmm3
-; SSE2-NEXT: pandn %xmm5, %xmm4
-; SSE2-NEXT: por %xmm3, %xmm4
-; SSE2-NEXT: movdqa %xmm5, %xmm3
-; SSE2-NEXT: pcmpgtd %xmm2, %xmm3
-; SSE2-NEXT: pand %xmm3, %xmm2
-; SSE2-NEXT: pandn %xmm5, %xmm3
-; SSE2-NEXT: por %xmm2, %xmm3
-; SSE2-NEXT: movdqa %xmm5, %xmm2
-; SSE2-NEXT: pcmpgtd %xmm1, %xmm2
-; SSE2-NEXT: pand %xmm2, %xmm1
-; SSE2-NEXT: pandn %xmm5, %xmm2
-; SSE2-NEXT: por %xmm1, %xmm2
-; SSE2-NEXT: movdqa %xmm5, %xmm1
-; SSE2-NEXT: pcmpgtd %xmm0, %xmm1
-; SSE2-NEXT: pand %xmm1, %xmm0
-; SSE2-NEXT: pandn %xmm5, %xmm1
-; SSE2-NEXT: por %xmm0, %xmm1
-; SSE2-NEXT: movdqa {{.*#+}} xmm5 = [4286578688,4286578688,4286578688,4286578688]
-; SSE2-NEXT: movdqa %xmm1, %xmm0
-; SSE2-NEXT: pcmpgtd %xmm5, %xmm0
-; SSE2-NEXT: pand %xmm0, %xmm1
-; SSE2-NEXT: pandn %xmm5, %xmm0
-; SSE2-NEXT: por %xmm1, %xmm0
-; SSE2-NEXT: movdqa %xmm2, %xmm1
-; SSE2-NEXT: pcmpgtd %xmm5, %xmm1
-; SSE2-NEXT: pand %xmm1, %xmm2
-; SSE2-NEXT: pandn %xmm5, %xmm1
-; SSE2-NEXT: por %xmm2, %xmm1
-; SSE2-NEXT: movdqa %xmm3, %xmm2
-; SSE2-NEXT: pcmpgtd %xmm5, %xmm2
-; SSE2-NEXT: pand %xmm2, %xmm3
-; SSE2-NEXT: pandn %xmm5, %xmm2
-; SSE2-NEXT: por %xmm3, %xmm2
-; SSE2-NEXT: movdqa %xmm4, %xmm3
-; SSE2-NEXT: pcmpgtd %xmm5, %xmm3
-; SSE2-NEXT: pand %xmm3, %xmm4
-; SSE2-NEXT: pandn %xmm5, %xmm3
-; SSE2-NEXT: por %xmm4, %xmm3
-; SSE2-NEXT: movd %xmm3, %r8d
-; SSE2-NEXT: movw %r8w, 36(%rdi)
-; SSE2-NEXT: movd %xmm2, %r11d
-; SSE2-NEXT: movw %r11w, 24(%rdi)
-; SSE2-NEXT: movd %xmm1, %r14d
-; SSE2-NEXT: movw %r14w, 12(%rdi)
-; SSE2-NEXT: movd %xmm0, %eax
-; SSE2-NEXT: movw %ax, (%rdi)
-; SSE2-NEXT: pshufd {{.*#+}} xmm4 = xmm3[3,3,3,3]
-; SSE2-NEXT: movd %xmm4, %ecx
-; SSE2-NEXT: movw %cx, 45(%rdi)
-; SSE2-NEXT: pshufd {{.*#+}} xmm4 = xmm3[2,3,2,3]
-; SSE2-NEXT: movd %xmm4, %edx
-; SSE2-NEXT: movw %dx, 42(%rdi)
-; SSE2-NEXT: pshufd {{.*#+}} xmm3 = xmm3[1,1,1,1]
-; SSE2-NEXT: movd %xmm3, %esi
-; SSE2-NEXT: movw %si, 39(%rdi)
-; SSE2-NEXT: shrl $16, %r8d
-; SSE2-NEXT: movb %r8b, 38(%rdi)
-; SSE2-NEXT: pshufd {{.*#+}} xmm3 = xmm2[3,3,3,3]
-; SSE2-NEXT: movd %xmm3, %r8d
-; SSE2-NEXT: movw %r8w, 33(%rdi)
-; SSE2-NEXT: pshufd {{.*#+}} xmm3 = xmm2[2,3,2,3]
-; SSE2-NEXT: movd %xmm3, %r9d
-; SSE2-NEXT: movw %r9w, 30(%rdi)
-; SSE2-NEXT: pshufd {{.*#+}} xmm2 = xmm2[1,1,1,1]
-; SSE2-NEXT: movd %xmm2, %r10d
-; SSE2-NEXT: movw %r10w, 27(%rdi)
-; SSE2-NEXT: shrl $16, %r11d
-; SSE2-NEXT: movb %r11b, 26(%rdi)
-; SSE2-NEXT: pshufd {{.*#+}} xmm2 = xmm1[3,3,3,3]
-; SSE2-NEXT: movd %xmm2, %r11d
-; SSE2-NEXT: movw %r11w, 21(%rdi)
-; SSE2-NEXT: pshufd {{.*#+}} xmm2 = xmm1[2,3,2,3]
-; SSE2-NEXT: movd %xmm2, %ebx
-; SSE2-NEXT: movw %bx, 18(%rdi)
-; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[1,1,1,1]
-; SSE2-NEXT: movd %xmm1, %ebp
-; SSE2-NEXT: movw %bp, 15(%rdi)
-; SSE2-NEXT: shrl $16, %r14d
-; SSE2-NEXT: movb %r14b, 14(%rdi)
-; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm0[3,3,3,3]
-; SSE2-NEXT: movd %xmm1, %r14d
-; SSE2-NEXT: movw %r14w, 9(%rdi)
-; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm0[2,3,2,3]
-; SSE2-NEXT: movd %xmm1, %r15d
-; SSE2-NEXT: movw %r15w, 6(%rdi)
-; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,1,1]
-; SSE2-NEXT: movd %xmm0, %r12d
-; SSE2-NEXT: movw %r12w, 3(%rdi)
-; SSE2-NEXT: shrl $16, %eax
-; SSE2-NEXT: movb %al, 2(%rdi)
-; SSE2-NEXT: shrl $16, %ecx
-; SSE2-NEXT: movb %cl, 47(%rdi)
-; SSE2-NEXT: shrl $16, %edx
-; SSE2-NEXT: movb %dl, 44(%rdi)
-; SSE2-NEXT: shrl $16, %esi
-; SSE2-NEXT: movb %sil, 41(%rdi)
-; SSE2-NEXT: shrl $16, %r8d
-; SSE2-NEXT: movb %r8b, 35(%rdi)
-; SSE2-NEXT: shrl $16, %r9d
-; SSE2-NEXT: movb %r9b, 32(%rdi)
-; SSE2-NEXT: shrl $16, %r10d
-; SSE2-NEXT: movb %r10b, 29(%rdi)
-; SSE2-NEXT: shrl $16, %r11d
-; SSE2-NEXT: movb %r11b, 23(%rdi)
-; SSE2-NEXT: shrl $16, %ebx
-; SSE2-NEXT: movb %bl, 20(%rdi)
-; SSE2-NEXT: shrl $16, %ebp
-; SSE2-NEXT: movb %bpl, 17(%rdi)
-; SSE2-NEXT: shrl $16, %r14d
-; SSE2-NEXT: movb %r14b, 11(%rdi)
-; SSE2-NEXT: shrl $16, %r15d
-; SSE2-NEXT: movb %r15b, 8(%rdi)
-; SSE2-NEXT: shrl $16, %r12d
-; SSE2-NEXT: movb %r12b, 5(%rdi)
-; SSE2-NEXT: popq %rbx
-; SSE2-NEXT: popq %r12
-; SSE2-NEXT: popq %r14
-; SSE2-NEXT: popq %r15
-; SSE2-NEXT: popq %rbp
-; SSE2-NEXT: retq
-;
-; SSSE3-LABEL: trunc_ssat_v16i32_v16i24:
-; SSSE3: # %bb.0:
-; SSSE3-NEXT: pushq %rbp
-; SSSE3-NEXT: pushq %r15
-; SSSE3-NEXT: pushq %r14
-; SSSE3-NEXT: pushq %r12
-; SSSE3-NEXT: pushq %rbx
-; SSSE3-NEXT: movdqa {{.*#+}} xmm5 = [8388607,8388607,8388607,8388607]
-; SSSE3-NEXT: movdqa %xmm5, %xmm4
-; SSSE3-NEXT: pcmpgtd %xmm3, %xmm4
-; SSSE3-NEXT: pand %xmm4, %xmm3
-; SSSE3-NEXT: pandn %xmm5, %xmm4
-; SSSE3-NEXT: por %xmm3, %xmm4
-; SSSE3-NEXT: movdqa %xmm5, %xmm3
-; SSSE3-NEXT: pcmpgtd %xmm2, %xmm3
-; SSSE3-NEXT: pand %xmm3, %xmm2
-; SSSE3-NEXT: pandn %xmm5, %xmm3
-; SSSE3-NEXT: por %xmm2, %xmm3
-; SSSE3-NEXT: movdqa %xmm5, %xmm2
-; SSSE3-NEXT: pcmpgtd %xmm1, %xmm2
-; SSSE3-NEXT: pand %xmm2, %xmm1
-; SSSE3-NEXT: pandn %xmm5, %xmm2
-; SSSE3-NEXT: por %xmm1, %xmm2
-; SSSE3-NEXT: movdqa %xmm5, %xmm1
-; SSSE3-NEXT: pcmpgtd %xmm0, %xmm1
-; SSSE3-NEXT: pand %xmm1, %xmm0
-; SSSE3-NEXT: pandn %xmm5, %xmm1
-; SSSE3-NEXT: por %xmm0, %xmm1
-; SSSE3-NEXT: movdqa {{.*#+}} xmm5 = [4286578688,4286578688,4286578688,4286578688]
-; SSSE3-NEXT: movdqa %xmm1, %xmm0
-; SSSE3-NEXT: pcmpgtd %xmm5, %xmm0
-; SSSE3-NEXT: pand %xmm0, %xmm1
-; SSSE3-NEXT: pandn %xmm5, %xmm0
-; SSSE3-NEXT: por %xmm1, %xmm0
-; SSSE3-NEXT: movdqa %xmm2, %xmm1
-; SSSE3-NEXT: pcmpgtd %xmm5, %xmm1
-; SSSE3-NEXT: pand %xmm1, %xmm2
-; SSSE3-NEXT: pandn %xmm5, %xmm1
-; SSSE3-NEXT: por %xmm2, %xmm1
-; SSSE3-NEXT: movdqa %xmm3, %xmm2
-; SSSE3-NEXT: pcmpgtd %xmm5, %xmm2
-; SSSE3-NEXT: pand %xmm2, %xmm3
-; SSSE3-NEXT: pandn %xmm5, %xmm2
-; SSSE3-NEXT: por %xmm3, %xmm2
-; SSSE3-NEXT: movdqa %xmm4, %xmm3
-; SSSE3-NEXT: pcmpgtd %xmm5, %xmm3
-; SSSE3-NEXT: pand %xmm3, %xmm4
-; SSSE3-NEXT: pandn %xmm5, %xmm3
-; SSSE3-NEXT: por %xmm4, %xmm3
-; SSSE3-NEXT: movd %xmm3, %r8d
-; SSSE3-NEXT: movw %r8w, 36(%rdi)
-; SSSE3-NEXT: movd %xmm2, %r11d
-; SSSE3-NEXT: movw %r11w, 24(%rdi)
-; SSSE3-NEXT: movd %xmm1, %r14d
-; SSSE3-NEXT: movw %r14w, 12(%rdi)
-; SSSE3-NEXT: movd %xmm0, %eax
-; SSSE3-NEXT: movw %ax, (%rdi)
-; SSSE3-NEXT: pshufd {{.*#+}} xmm4 = xmm3[3,3,3,3]
-; SSSE3-NEXT: movd %xmm4, %ecx
-; SSSE3-NEXT: movw %cx, 45(%rdi)
-; SSSE3-NEXT: pshufd {{.*#+}} xmm4 = xmm3[2,3,2,3]
-; SSSE3-NEXT: movd %xmm4, %edx
-; SSSE3-NEXT: movw %dx, 42(%rdi)
-; SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm3[1,1,1,1]
-; SSSE3-NEXT: movd %xmm3, %esi
-; SSSE3-NEXT: movw %si, 39(%rdi)
-; SSSE3-NEXT: shrl $16, %r8d
-; SSSE3-NEXT: movb %r8b, 38(%rdi)
-; SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm2[3,3,3,3]
-; SSSE3-NEXT: movd %xmm3, %r8d
-; SSSE3-NEXT: movw %r8w, 33(%rdi)
-; SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm2[2,3,2,3]
-; SSSE3-NEXT: movd %xmm3, %r9d
-; SSSE3-NEXT: movw %r9w, 30(%rdi)
-; SSSE3-NEXT: pshufd {{.*#+}} xmm2 = xmm2[1,1,1,1]
-; SSSE3-NEXT: movd %xmm2, %r10d
-; SSSE3-NEXT: movw %r10w, 27(%rdi)
-; SSSE3-NEXT: shrl $16, %r11d
-; SSSE3-NEXT: movb %r11b, 26(%rdi)
-; SSSE3-NEXT: pshufd {{.*#+}} xmm2 = xmm1[3,3,3,3]
-; SSSE3-NEXT: movd %xmm2, %r11d
-; SSSE3-NEXT: movw %r11w, 21(%rdi)
-; SSSE3-NEXT: pshufd {{.*#+}} xmm2 = xmm1[2,3,2,3]
-; SSSE3-NEXT: movd %xmm2, %ebx
-; SSSE3-NEXT: movw %bx, 18(%rdi)
-; SSSE3-NEXT: pshufd {{.*#+}} xmm1 = xmm1[1,1,1,1]
-; SSSE3-NEXT: movd %xmm1, %ebp
-; SSSE3-NEXT: movw %bp, 15(%rdi)
-; SSSE3-NEXT: shrl $16, %r14d
-; SSSE3-NEXT: movb %r14b, 14(%rdi)
-; SSSE3-NEXT: pshufd {{.*#+}} xmm1 = xmm0[3,3,3,3]
-; SSSE3-NEXT: movd %xmm1, %r14d
-; SSSE3-NEXT: movw %r14w, 9(%rdi)
-; SSSE3-NEXT: pshufd {{.*#+}} xmm1 = xmm0[2,3,2,3]
-; SSSE3-NEXT: movd %xmm1, %r15d
-; SSSE3-NEXT: movw %r15w, 6(%rdi)
-; SSSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,1,1]
-; SSSE3-NEXT: movd %xmm0, %r12d
-; SSSE3-NEXT: movw %r12w, 3(%rdi)
-; SSSE3-NEXT: shrl $16, %eax
-; SSSE3-NEXT: movb %al, 2(%rdi)
-; SSSE3-NEXT: shrl $16, %ecx
-; SSSE3-NEXT: movb %cl, 47(%rdi)
-; SSSE3-NEXT: shrl $16, %edx
-; SSSE3-NEXT: movb %dl, 44(%rdi)
-; SSSE3-NEXT: shrl $16, %esi
-; SSSE3-NEXT: movb %sil, 41(%rdi)
-; SSSE3-NEXT: shrl $16, %r8d
-; SSSE3-NEXT: movb %r8b, 35(%rdi)
-; SSSE3-NEXT: shrl $16, %r9d
-; SSSE3-NEXT: movb %r9b, 32(%rdi)
-; SSSE3-NEXT: shrl $16, %r10d
-; SSSE3-NEXT: movb %r10b, 29(%rdi)
-; SSSE3-NEXT: shrl $16, %r11d
-; SSSE3-NEXT: movb %r11b, 23(%rdi)
-; SSSE3-NEXT: shrl $16, %ebx
-; SSSE3-NEXT: movb %bl, 20(%rdi)
-; SSSE3-NEXT: shrl $16, %ebp
-; SSSE3-NEXT: movb %bpl, 17(%rdi)
-; SSSE3-NEXT: shrl $16, %r14d
-; SSSE3-NEXT: movb %r14b, 11(%rdi)
-; SSSE3-NEXT: shrl $16, %r15d
-; SSSE3-NEXT: movb %r15b, 8(%rdi)
-; SSSE3-NEXT: shrl $16, %r12d
-; SSSE3-NEXT: movb %r12b, 5(%rdi)
-; SSSE3-NEXT: popq %rbx
-; SSSE3-NEXT: popq %r12
-; SSSE3-NEXT: popq %r14
-; SSSE3-NEXT: popq %r15
-; SSSE3-NEXT: popq %rbp
-; SSSE3-NEXT: retq
+; SSE2-SSSE3-LABEL: trunc_ssat_v16i32_v16i24:
+; SSE2-SSSE3: # %bb.0:
+; SSE2-SSSE3-NEXT: pushq %rbp
+; SSE2-SSSE3-NEXT: pushq %r15
+; SSE2-SSSE3-NEXT: pushq %r14
+; SSE2-SSSE3-NEXT: pushq %r12
+; SSE2-SSSE3-NEXT: pushq %rbx
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm5 = [8388607,8388607,8388607,8388607]
+; SSE2-SSSE3-NEXT: movdqa %xmm5, %xmm4
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm3, %xmm4
+; SSE2-SSSE3-NEXT: pand %xmm4, %xmm3
+; SSE2-SSSE3-NEXT: pandn %xmm5, %xmm4
+; SSE2-SSSE3-NEXT: por %xmm3, %xmm4
+; SSE2-SSSE3-NEXT: movdqa %xmm5, %xmm3
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm2, %xmm3
+; SSE2-SSSE3-NEXT: pand %xmm3, %xmm2
+; SSE2-SSSE3-NEXT: pandn %xmm5, %xmm3
+; SSE2-SSSE3-NEXT: por %xmm2, %xmm3
+; SSE2-SSSE3-NEXT: movdqa %xmm5, %xmm2
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm1, %xmm2
+; SSE2-SSSE3-NEXT: pand %xmm2, %xmm1
+; SSE2-SSSE3-NEXT: pandn %xmm5, %xmm2
+; SSE2-SSSE3-NEXT: por %xmm1, %xmm2
+; SSE2-SSSE3-NEXT: movdqa %xmm5, %xmm1
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm0, %xmm1
+; SSE2-SSSE3-NEXT: pand %xmm1, %xmm0
+; SSE2-SSSE3-NEXT: pandn %xmm5, %xmm1
+; SSE2-SSSE3-NEXT: por %xmm0, %xmm1
+; SSE2-SSSE3-NEXT: movdqa {{.*#+}} xmm5 = [4286578688,4286578688,4286578688,4286578688]
+; SSE2-SSSE3-NEXT: movdqa %xmm1, %xmm0
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm5, %xmm0
+; SSE2-SSSE3-NEXT: pand %xmm0, %xmm1
+; SSE2-SSSE3-NEXT: pandn %xmm5, %xmm0
+; SSE2-SSSE3-NEXT: por %xmm1, %xmm0
+; SSE2-SSSE3-NEXT: movdqa %xmm2, %xmm1
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm5, %xmm1
+; SSE2-SSSE3-NEXT: pand %xmm1, %xmm2
+; SSE2-SSSE3-NEXT: pandn %xmm5, %xmm1
+; SSE2-SSSE3-NEXT: por %xmm2, %xmm1
+; SSE2-SSSE3-NEXT: movdqa %xmm3, %xmm2
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm5, %xmm2
+; SSE2-SSSE3-NEXT: pand %xmm2, %xmm3
+; SSE2-SSSE3-NEXT: pandn %xmm5, %xmm2
+; SSE2-SSSE3-NEXT: por %xmm3, %xmm2
+; SSE2-SSSE3-NEXT: movdqa %xmm4, %xmm3
+; SSE2-SSSE3-NEXT: pcmpgtd %xmm5, %xmm3
+; SSE2-SSSE3-NEXT: pand %xmm3, %xmm4
+; SSE2-SSSE3-NEXT: pandn %xmm5, %xmm3
+; SSE2-SSSE3-NEXT: por %xmm4, %xmm3
+; SSE2-SSSE3-NEXT: movd %xmm3, %r8d
+; SSE2-SSSE3-NEXT: movw %r8w, 36(%rdi)
+; SSE2-SSSE3-NEXT: movd %xmm2, %r11d
+; SSE2-SSSE3-NEXT: movw %r11w, 24(%rdi)
+; SSE2-SSSE3-NEXT: movd %xmm1, %r14d
+; SSE2-SSSE3-NEXT: movw %r14w, 12(%rdi)
+; SSE2-SSSE3-NEXT: movd %xmm0, %eax
+; SSE2-SSSE3-NEXT: movw %ax, (%rdi)
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm4 = xmm3[3,3,3,3]
+; SSE2-SSSE3-NEXT: movd %xmm4, %ecx
+; SSE2-SSSE3-NEXT: movw %cx, 45(%rdi)
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm4 = xmm3[2,3,2,3]
+; SSE2-SSSE3-NEXT: movd %xmm4, %edx
+; SSE2-SSSE3-NEXT: movw %dx, 42(%rdi)
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm3[1,1,1,1]
+; SSE2-SSSE3-NEXT: movd %xmm3, %esi
+; SSE2-SSSE3-NEXT: movw %si, 39(%rdi)
+; SSE2-SSSE3-NEXT: shrl $16, %r8d
+; SSE2-SSSE3-NEXT: movb %r8b, 38(%rdi)
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm2[3,3,3,3]
+; SSE2-SSSE3-NEXT: movd %xmm3, %r8d
+; SSE2-SSSE3-NEXT: movw %r8w, 33(%rdi)
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm3 = xmm2[2,3,2,3]
+; SSE2-SSSE3-NEXT: movd %xmm3, %r9d
+; SSE2-SSSE3-NEXT: movw %r9w, 30(%rdi)
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm2 = xmm2[1,1,1,1]
+; SSE2-SSSE3-NEXT: movd %xmm2, %r10d
+; SSE2-SSSE3-NEXT: movw %r10w, 27(%rdi)
+; SSE2-SSSE3-NEXT: shrl $16, %r11d
+; SSE2-SSSE3-NEXT: movb %r11b, 26(%rdi)
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm2 = xmm1[3,3,3,3]
+; SSE2-SSSE3-NEXT: movd %xmm2, %r11d
+; SSE2-SSSE3-NEXT: movw %r11w, 21(%rdi)
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm2 = xmm1[2,3,2,3]
+; SSE2-SSSE3-NEXT: movd %xmm2, %ebx
+; SSE2-SSSE3-NEXT: movw %bx, 18(%rdi)
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm1 = xmm1[1,1,1,1]
+; SSE2-SSSE3-NEXT: movd %xmm1, %ebp
+; SSE2-SSSE3-NEXT: movw %bp, 15(%rdi)
+; SSE2-SSSE3-NEXT: shrl $16, %r14d
+; SSE2-SSSE3-NEXT: movb %r14b, 14(%rdi)
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm1 = xmm0[3,3,3,3]
+; SSE2-SSSE3-NEXT: movd %xmm1, %r14d
+; SSE2-SSSE3-NEXT: movw %r14w, 9(%rdi)
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm1 = xmm0[2,3,2,3]
+; SSE2-SSSE3-NEXT: movd %xmm1, %r15d
+; SSE2-SSSE3-NEXT: movw %r15w, 6(%rdi)
+; SSE2-SSSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,1,1]
+; SSE2-SSSE3-NEXT: movd %xmm0, %r12d
+; SSE2-SSSE3-NEXT: movw %r12w, 3(%rdi)
+; SSE2-SSSE3-NEXT: shrl $16, %eax
+; SSE2-SSSE3-NEXT: movb %al, 2(%rdi)
+; SSE2-SSSE3-NEXT: shrl $16, %ecx
+; SSE2-SSSE3-NEXT: movb %cl, 47(%rdi)
+; SSE2-SSSE3-NEXT: shrl $16, %edx
+; SSE2-SSSE3-NEXT: movb %dl, 44(%rdi)
+; SSE2-SSSE3-NEXT: shrl $16, %esi
+; SSE2-SSSE3-NEXT: movb %sil, 41(%rdi)
+; SSE2-SSSE3-NEXT: shrl $16, %r8d
+; SSE2-SSSE3-NEXT: movb %r8b, 35(%rdi)
+; SSE2-SSSE3-NEXT: shrl $16, %r9d
+; SSE2-SSSE3-NEXT: movb %r9b, 32(%rdi)
+; SSE2-SSSE3-NEXT: shrl $16, %r10d
+; SSE2-SSSE3-NEXT: movb %r10b, 29(%rdi)
+; SSE2-SSSE3-NEXT: shrl $16, %r11d
+; SSE2-SSSE3-NEXT: movb %r11b, 23(%rdi)
+; SSE2-SSSE3-NEXT: shrl $16, %ebx
+; SSE2-SSSE3-NEXT: movb %bl, 20(%rdi)
+; SSE2-SSSE3-NEXT: shrl $16, %ebp
+; SSE2-SSSE3-NEXT: movb %bpl, 17(%rdi)
+; SSE2-SSSE3-NEXT: shrl $16, %r14d
+; SSE2-SSSE3-NEXT: movb %r14b, 11(%rdi)
+; SSE2-SSSE3-NEXT: shrl $16, %r15d
+; SSE2-SSSE3-NEXT: movb %r15b, 8(%rdi)
+; SSE2-SSSE3-NEXT: shrl $16, %r12d
+; SSE2-SSSE3-NEXT: movb %r12b, 5(%rdi)
+; SSE2-SSSE3-NEXT: popq %rbx
+; SSE2-SSSE3-NEXT: popq %r12
+; SSE2-SSSE3-NEXT: popq %r14
+; SSE2-SSSE3-NEXT: popq %r15
+; SSE2-SSSE3-NEXT: popq %rbp
+; SSE2-SSSE3-NEXT: retq
;
; SSE41-LABEL: trunc_ssat_v16i32_v16i24:
; SSE41: # %bb.0:
diff --git a/llvm/test/CodeGen/X86/vector-trunc-usat.ll b/llvm/test/CodeGen/X86/vector-trunc-usat.ll
index e70443c81e1fc5..da4011d8c420c8 100644
--- a/llvm/test/CodeGen/X86/vector-trunc-usat.ll
+++ b/llvm/test/CodeGen/X86/vector-trunc-usat.ll
@@ -1,12 +1,12 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+sse2 | FileCheck %s --check-prefixes=SSE2-SSSE3,SSE2
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+ssse3 | FileCheck %s --check-prefixes=SSE2-SSSE3,SSSE3
-; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+sse4.1 | FileCheck %s --check-prefix=SSE41
-; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx | FileCheck %s --check-prefix=AVX --check-prefix=AVX1
+; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+sse4.1 | FileCheck %s --check-prefixes=SSE41
+; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx | FileCheck %s --check-prefixes=AVX,AVX1
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx2 | FileCheck %s --check-prefixes=AVX,AVX2,AVX2-SLOW
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx2,+fast-variable-crosslane-shuffle,+fast-variable-perlane-shuffle | FileCheck %s --check-prefixes=AVX,AVX2,AVX2-FAST,AVX2-FAST-ALL
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx2,+fast-variable-perlane-shuffle | FileCheck %s --check-prefixes=AVX,AVX2,AVX2-FAST,AVX2-FAST-PERLANE
-; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512f | FileCheck %s --check-prefix=AVX512 --check-prefix=AVX512F
+; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512f | FileCheck %s --check-prefixes=AVX512,AVX512F
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512vl,+fast-variable-crosslane-shuffle,+fast-variable-perlane-shuffle | FileCheck %s --check-prefixes=AVX512,AVX512VL
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512vl,+fast-variable-perlane-shuffle | FileCheck %s --check-prefixes=AVX512,AVX512VL
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512bw,+fast-variable-crosslane-shuffle,+fast-variable-perlane-shuffle | FileCheck %s --check-prefixes=AVX512,AVX512BW
More information about the llvm-commits
mailing list