[llvm] 0ea50be - [X86] SimplifyDemandedVectorEltsForTargetNode - add X86ISD::ANDNP handling
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 24 06:12:07 PST 2022
Author: Simon Pilgrim
Date: 2022-02-24T13:51:51Z
New Revision: 0ea50bee83820bf3f88f25e16dc86ab7125c42a6
URL: https://github.com/llvm/llvm-project/commit/0ea50bee83820bf3f88f25e16dc86ab7125c42a6
DIFF: https://github.com/llvm/llvm-project/commit/0ea50bee83820bf3f88f25e16dc86ab7125c42a6.diff
LOG: [X86] SimplifyDemandedVectorEltsForTargetNode - add X86ISD::ANDNP handling
Added:
Modified:
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/vector-fshl-128.ll
llvm/test/CodeGen/X86/vector-fshl-256.ll
llvm/test/CodeGen/X86/vector-fshr-128.ll
llvm/test/CodeGen/X86/vector-fshr-256.ll
llvm/test/CodeGen/X86/vector-interleaved-load-i16-stride-5.ll
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index c320259327804..7d6d0476f84d1 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -40448,6 +40448,35 @@ bool X86TargetLowering::SimplifyDemandedVectorEltsForTargetNode(
KnownZero.setHighBits(ShiftAmt);
break;
}
+ case X86ISD::ANDNP: {
+ // ANDNP = (~LHS & RHS);
+ SDValue LHS = Op.getOperand(0);
+ SDValue RHS = Op.getOperand(1);
+
+ APInt RHSUndef, RHSZero;
+ if (SimplifyDemandedVectorElts(RHS, DemandedElts, RHSUndef, RHSZero, TLO,
+ Depth + 1))
+ return true;
+
+ APInt LHSUndef, LHSZero;
+ if (SimplifyDemandedVectorElts(LHS, DemandedElts, LHSUndef, LHSZero, TLO,
+ Depth + 1))
+ return true;
+
+ if (!DemandedElts.isAllOnes()) {
+ SDValue NewLHS = SimplifyMultipleUseDemandedVectorElts(
+ LHS, DemandedElts, TLO.DAG, Depth + 1);
+ SDValue NewRHS = SimplifyMultipleUseDemandedVectorElts(
+ RHS, DemandedElts, TLO.DAG, Depth + 1);
+ if (NewLHS || NewRHS) {
+ NewLHS = NewLHS ? NewLHS : LHS;
+ NewRHS = NewRHS ? NewRHS : RHS;
+ return TLO.CombineTo(
+ Op, TLO.DAG.getNode(Opc, SDLoc(Op), VT, NewLHS, NewRHS));
+ }
+ }
+ break;
+ }
case X86ISD::CVTSI2P:
case X86ISD::CVTUI2P: {
SDValue Src = Op.getOperand(0);
diff --git a/llvm/test/CodeGen/X86/vector-fshl-128.ll b/llvm/test/CodeGen/X86/vector-fshl-128.ll
index 19e8e73ae943d..8e6a3af335210 100644
--- a/llvm/test/CodeGen/X86/vector-fshl-128.ll
+++ b/llvm/test/CodeGen/X86/vector-fshl-128.ll
@@ -1193,20 +1193,32 @@ define <8 x i16> @splatvar_funnnel_v8i16(<8 x i16> %x, <8 x i16> %y, <8 x i16> %
; SSE41-NEXT: por %xmm1, %xmm0
; SSE41-NEXT: retq
;
-; AVX-LABEL: splatvar_funnnel_v8i16:
-; AVX: # %bb.0:
-; AVX-NEXT: vmovdqa {{.*#+}} xmm3 = [15,0,0,0]
-; AVX-NEXT: vpandn %xmm3, %xmm2, %xmm4
-; AVX-NEXT: vpsrlw $1, %xmm1, %xmm1
-; AVX-NEXT: vpsrlw %xmm4, %xmm1, %xmm1
-; AVX-NEXT: vpand %xmm3, %xmm2, %xmm2
-; AVX-NEXT: vpsllw %xmm2, %xmm0, %xmm0
-; AVX-NEXT: vpor %xmm1, %xmm0, %xmm0
-; AVX-NEXT: retq
+; AVX1-LABEL: splatvar_funnnel_v8i16:
+; AVX1: # %bb.0:
+; AVX1-NEXT: vmovddup {{.*#+}} xmm3 = [15,15]
+; AVX1-NEXT: # xmm3 = mem[0,0]
+; AVX1-NEXT: vandnps %xmm3, %xmm2, %xmm4
+; AVX1-NEXT: vpsrlw $1, %xmm1, %xmm1
+; AVX1-NEXT: vpsrlw %xmm4, %xmm1, %xmm1
+; AVX1-NEXT: vandps %xmm3, %xmm2, %xmm2
+; AVX1-NEXT: vpsllw %xmm2, %xmm0, %xmm0
+; AVX1-NEXT: vpor %xmm1, %xmm0, %xmm0
+; AVX1-NEXT: retq
+;
+; AVX2-LABEL: splatvar_funnnel_v8i16:
+; AVX2: # %bb.0:
+; AVX2-NEXT: vpbroadcastq {{.*#+}} xmm3 = [15,15]
+; AVX2-NEXT: vpandn %xmm3, %xmm2, %xmm4
+; AVX2-NEXT: vpsrlw $1, %xmm1, %xmm1
+; AVX2-NEXT: vpsrlw %xmm4, %xmm1, %xmm1
+; AVX2-NEXT: vpand %xmm3, %xmm2, %xmm2
+; AVX2-NEXT: vpsllw %xmm2, %xmm0, %xmm0
+; AVX2-NEXT: vpor %xmm1, %xmm0, %xmm0
+; AVX2-NEXT: retq
;
; AVX512F-LABEL: splatvar_funnnel_v8i16:
; AVX512F: # %bb.0:
-; AVX512F-NEXT: vmovdqa {{.*#+}} xmm3 = [15,0,0,0]
+; AVX512F-NEXT: vpbroadcastq {{.*#+}} xmm3 = [15,15]
; AVX512F-NEXT: vpandn %xmm3, %xmm2, %xmm4
; AVX512F-NEXT: vpsrlw $1, %xmm1, %xmm1
; AVX512F-NEXT: vpsrlw %xmm4, %xmm1, %xmm1
@@ -1217,7 +1229,7 @@ define <8 x i16> @splatvar_funnnel_v8i16(<8 x i16> %x, <8 x i16> %y, <8 x i16> %
;
; AVX512VL-LABEL: splatvar_funnnel_v8i16:
; AVX512VL: # %bb.0:
-; AVX512VL-NEXT: vmovdqa {{.*#+}} xmm3 = [15,0,0,0]
+; AVX512VL-NEXT: vpbroadcastq {{.*#+}} xmm3 = [15,15]
; AVX512VL-NEXT: vpandn %xmm3, %xmm2, %xmm4
; AVX512VL-NEXT: vpsrlw $1, %xmm1, %xmm1
; AVX512VL-NEXT: vpsrlw %xmm4, %xmm1, %xmm1
@@ -1228,7 +1240,7 @@ define <8 x i16> @splatvar_funnnel_v8i16(<8 x i16> %x, <8 x i16> %y, <8 x i16> %
;
; AVX512BW-LABEL: splatvar_funnnel_v8i16:
; AVX512BW: # %bb.0:
-; AVX512BW-NEXT: vmovdqa {{.*#+}} xmm3 = [15,0,0,0]
+; AVX512BW-NEXT: vpbroadcastq {{.*#+}} xmm3 = [15,15]
; AVX512BW-NEXT: vpandn %xmm3, %xmm2, %xmm4
; AVX512BW-NEXT: vpsrlw $1, %xmm1, %xmm1
; AVX512BW-NEXT: vpsrlw %xmm4, %xmm1, %xmm1
@@ -1249,7 +1261,7 @@ define <8 x i16> @splatvar_funnnel_v8i16(<8 x i16> %x, <8 x i16> %y, <8 x i16> %
;
; AVX512VLBW-LABEL: splatvar_funnnel_v8i16:
; AVX512VLBW: # %bb.0:
-; AVX512VLBW-NEXT: vmovdqa {{.*#+}} xmm3 = [15,0,0,0]
+; AVX512VLBW-NEXT: vpbroadcastq {{.*#+}} xmm3 = [15,15]
; AVX512VLBW-NEXT: vpandn %xmm3, %xmm2, %xmm4
; AVX512VLBW-NEXT: vpsrlw $1, %xmm1, %xmm1
; AVX512VLBW-NEXT: vpsrlw %xmm4, %xmm1, %xmm1
@@ -1264,16 +1276,28 @@ define <8 x i16> @splatvar_funnnel_v8i16(<8 x i16> %x, <8 x i16> %y, <8 x i16> %
; AVX512VLVBMI2-NEXT: vpshldvw %xmm2, %xmm1, %xmm0
; AVX512VLVBMI2-NEXT: retq
;
-; XOP-LABEL: splatvar_funnnel_v8i16:
-; XOP: # %bb.0:
-; XOP-NEXT: vmovdqa {{.*#+}} xmm3 = [15,0,0,0]
-; XOP-NEXT: vpandn %xmm3, %xmm2, %xmm4
-; XOP-NEXT: vpsrlw $1, %xmm1, %xmm1
-; XOP-NEXT: vpsrlw %xmm4, %xmm1, %xmm1
-; XOP-NEXT: vpand %xmm3, %xmm2, %xmm2
-; XOP-NEXT: vpsllw %xmm2, %xmm0, %xmm0
-; XOP-NEXT: vpor %xmm1, %xmm0, %xmm0
-; XOP-NEXT: retq
+; XOPAVX1-LABEL: splatvar_funnnel_v8i16:
+; XOPAVX1: # %bb.0:
+; XOPAVX1-NEXT: vmovddup {{.*#+}} xmm3 = [15,15]
+; XOPAVX1-NEXT: # xmm3 = mem[0,0]
+; XOPAVX1-NEXT: vandnps %xmm3, %xmm2, %xmm4
+; XOPAVX1-NEXT: vpsrlw $1, %xmm1, %xmm1
+; XOPAVX1-NEXT: vpsrlw %xmm4, %xmm1, %xmm1
+; XOPAVX1-NEXT: vandps %xmm3, %xmm2, %xmm2
+; XOPAVX1-NEXT: vpsllw %xmm2, %xmm0, %xmm0
+; XOPAVX1-NEXT: vpor %xmm1, %xmm0, %xmm0
+; XOPAVX1-NEXT: retq
+;
+; XOPAVX2-LABEL: splatvar_funnnel_v8i16:
+; XOPAVX2: # %bb.0:
+; XOPAVX2-NEXT: vpbroadcastq {{.*#+}} xmm3 = [15,15]
+; XOPAVX2-NEXT: vpandn %xmm3, %xmm2, %xmm4
+; XOPAVX2-NEXT: vpsrlw $1, %xmm1, %xmm1
+; XOPAVX2-NEXT: vpsrlw %xmm4, %xmm1, %xmm1
+; XOPAVX2-NEXT: vpand %xmm3, %xmm2, %xmm2
+; XOPAVX2-NEXT: vpsllw %xmm2, %xmm0, %xmm0
+; XOPAVX2-NEXT: vpor %xmm1, %xmm0, %xmm0
+; XOPAVX2-NEXT: retq
;
; X86-SSE2-LABEL: splatvar_funnnel_v8i16:
; X86-SSE2: # %bb.0:
diff --git a/llvm/test/CodeGen/X86/vector-fshl-256.ll b/llvm/test/CodeGen/X86/vector-fshl-256.ll
index 36882e35cfe56..9f14cea61cc62 100644
--- a/llvm/test/CodeGen/X86/vector-fshl-256.ll
+++ b/llvm/test/CodeGen/X86/vector-fshl-256.ll
@@ -981,12 +981,13 @@ define <8 x i32> @splatvar_funnnel_v8i32(<8 x i32> %x, <8 x i32> %y, <8 x i32> %
define <16 x i16> @splatvar_funnnel_v16i16(<16 x i16> %x, <16 x i16> %y, <16 x i16> %amt) nounwind {
; AVX1-LABEL: splatvar_funnnel_v16i16:
; AVX1: # %bb.0:
-; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [15,0,0,0]
-; AVX1-NEXT: vpandn %xmm3, %xmm2, %xmm4
+; AVX1-NEXT: vmovddup {{.*#+}} xmm3 = [15,15]
+; AVX1-NEXT: # xmm3 = mem[0,0]
+; AVX1-NEXT: vandnps %xmm3, %xmm2, %xmm4
; AVX1-NEXT: vextractf128 $1, %ymm1, %xmm5
; AVX1-NEXT: vpsrlw $1, %xmm5, %xmm5
; AVX1-NEXT: vpsrlw %xmm4, %xmm5, %xmm5
-; AVX1-NEXT: vpand %xmm3, %xmm2, %xmm2
+; AVX1-NEXT: vandps %xmm3, %xmm2, %xmm2
; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm3
; AVX1-NEXT: vpsllw %xmm2, %xmm3, %xmm3
; AVX1-NEXT: vpor %xmm5, %xmm3, %xmm3
@@ -1079,12 +1080,13 @@ define <16 x i16> @splatvar_funnnel_v16i16(<16 x i16> %x, <16 x i16> %y, <16 x i
;
; XOPAVX1-LABEL: splatvar_funnnel_v16i16:
; XOPAVX1: # %bb.0:
-; XOPAVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [15,0,0,0]
-; XOPAVX1-NEXT: vpandn %xmm3, %xmm2, %xmm4
+; XOPAVX1-NEXT: vmovddup {{.*#+}} xmm3 = [15,15]
+; XOPAVX1-NEXT: # xmm3 = mem[0,0]
+; XOPAVX1-NEXT: vandnps %xmm3, %xmm2, %xmm4
; XOPAVX1-NEXT: vextractf128 $1, %ymm1, %xmm5
; XOPAVX1-NEXT: vpsrlw $1, %xmm5, %xmm5
; XOPAVX1-NEXT: vpsrlw %xmm4, %xmm5, %xmm5
-; XOPAVX1-NEXT: vpand %xmm3, %xmm2, %xmm2
+; XOPAVX1-NEXT: vandps %xmm3, %xmm2, %xmm2
; XOPAVX1-NEXT: vextractf128 $1, %ymm0, %xmm3
; XOPAVX1-NEXT: vpsllw %xmm2, %xmm3, %xmm3
; XOPAVX1-NEXT: vpor %xmm5, %xmm3, %xmm3
diff --git a/llvm/test/CodeGen/X86/vector-fshr-128.ll b/llvm/test/CodeGen/X86/vector-fshr-128.ll
index 40d5b3929c34b..5305fbc03a5c8 100644
--- a/llvm/test/CodeGen/X86/vector-fshr-128.ll
+++ b/llvm/test/CodeGen/X86/vector-fshr-128.ll
@@ -1286,20 +1286,32 @@ define <8 x i16> @splatvar_funnnel_v8i16(<8 x i16> %x, <8 x i16> %y, <8 x i16> %
; SSE41-NEXT: por %xmm1, %xmm0
; SSE41-NEXT: retq
;
-; AVX-LABEL: splatvar_funnnel_v8i16:
-; AVX: # %bb.0:
-; AVX-NEXT: vmovdqa {{.*#+}} xmm3 = [15,0,0,0]
-; AVX-NEXT: vpand %xmm3, %xmm2, %xmm4
-; AVX-NEXT: vpsrlw %xmm4, %xmm1, %xmm1
-; AVX-NEXT: vpandn %xmm3, %xmm2, %xmm2
-; AVX-NEXT: vpsllw $1, %xmm0, %xmm0
-; AVX-NEXT: vpsllw %xmm2, %xmm0, %xmm0
-; AVX-NEXT: vpor %xmm1, %xmm0, %xmm0
-; AVX-NEXT: retq
+; AVX1-LABEL: splatvar_funnnel_v8i16:
+; AVX1: # %bb.0:
+; AVX1-NEXT: vmovddup {{.*#+}} xmm3 = [15,15]
+; AVX1-NEXT: # xmm3 = mem[0,0]
+; AVX1-NEXT: vandps %xmm3, %xmm2, %xmm4
+; AVX1-NEXT: vpsrlw %xmm4, %xmm1, %xmm1
+; AVX1-NEXT: vandnps %xmm3, %xmm2, %xmm2
+; AVX1-NEXT: vpsllw $1, %xmm0, %xmm0
+; AVX1-NEXT: vpsllw %xmm2, %xmm0, %xmm0
+; AVX1-NEXT: vpor %xmm1, %xmm0, %xmm0
+; AVX1-NEXT: retq
+;
+; AVX2-LABEL: splatvar_funnnel_v8i16:
+; AVX2: # %bb.0:
+; AVX2-NEXT: vpbroadcastq {{.*#+}} xmm3 = [15,15]
+; AVX2-NEXT: vpand %xmm3, %xmm2, %xmm4
+; AVX2-NEXT: vpsrlw %xmm4, %xmm1, %xmm1
+; AVX2-NEXT: vpandn %xmm3, %xmm2, %xmm2
+; AVX2-NEXT: vpsllw $1, %xmm0, %xmm0
+; AVX2-NEXT: vpsllw %xmm2, %xmm0, %xmm0
+; AVX2-NEXT: vpor %xmm1, %xmm0, %xmm0
+; AVX2-NEXT: retq
;
; AVX512F-LABEL: splatvar_funnnel_v8i16:
; AVX512F: # %bb.0:
-; AVX512F-NEXT: vmovdqa {{.*#+}} xmm3 = [15,0,0,0]
+; AVX512F-NEXT: vpbroadcastq {{.*#+}} xmm3 = [15,15]
; AVX512F-NEXT: vpand %xmm3, %xmm2, %xmm4
; AVX512F-NEXT: vpsrlw %xmm4, %xmm1, %xmm1
; AVX512F-NEXT: vpandn %xmm3, %xmm2, %xmm2
@@ -1310,7 +1322,7 @@ define <8 x i16> @splatvar_funnnel_v8i16(<8 x i16> %x, <8 x i16> %y, <8 x i16> %
;
; AVX512VL-LABEL: splatvar_funnnel_v8i16:
; AVX512VL: # %bb.0:
-; AVX512VL-NEXT: vmovdqa {{.*#+}} xmm3 = [15,0,0,0]
+; AVX512VL-NEXT: vpbroadcastq {{.*#+}} xmm3 = [15,15]
; AVX512VL-NEXT: vpand %xmm3, %xmm2, %xmm4
; AVX512VL-NEXT: vpsrlw %xmm4, %xmm1, %xmm1
; AVX512VL-NEXT: vpandn %xmm3, %xmm2, %xmm2
@@ -1321,7 +1333,7 @@ define <8 x i16> @splatvar_funnnel_v8i16(<8 x i16> %x, <8 x i16> %y, <8 x i16> %
;
; AVX512BW-LABEL: splatvar_funnnel_v8i16:
; AVX512BW: # %bb.0:
-; AVX512BW-NEXT: vmovdqa {{.*#+}} xmm3 = [15,0,0,0]
+; AVX512BW-NEXT: vpbroadcastq {{.*#+}} xmm3 = [15,15]
; AVX512BW-NEXT: vpand %xmm3, %xmm2, %xmm4
; AVX512BW-NEXT: vpsrlw %xmm4, %xmm1, %xmm1
; AVX512BW-NEXT: vpandn %xmm3, %xmm2, %xmm2
@@ -1342,7 +1354,7 @@ define <8 x i16> @splatvar_funnnel_v8i16(<8 x i16> %x, <8 x i16> %y, <8 x i16> %
;
; AVX512VLBW-LABEL: splatvar_funnnel_v8i16:
; AVX512VLBW: # %bb.0:
-; AVX512VLBW-NEXT: vmovdqa {{.*#+}} xmm3 = [15,0,0,0]
+; AVX512VLBW-NEXT: vpbroadcastq {{.*#+}} xmm3 = [15,15]
; AVX512VLBW-NEXT: vpand %xmm3, %xmm2, %xmm4
; AVX512VLBW-NEXT: vpsrlw %xmm4, %xmm1, %xmm1
; AVX512VLBW-NEXT: vpandn %xmm3, %xmm2, %xmm2
@@ -1358,16 +1370,28 @@ define <8 x i16> @splatvar_funnnel_v8i16(<8 x i16> %x, <8 x i16> %y, <8 x i16> %
; AVX512VLVBMI2-NEXT: vmovdqa %xmm1, %xmm0
; AVX512VLVBMI2-NEXT: retq
;
-; XOP-LABEL: splatvar_funnnel_v8i16:
-; XOP: # %bb.0:
-; XOP-NEXT: vmovdqa {{.*#+}} xmm3 = [15,0,0,0]
-; XOP-NEXT: vpand %xmm3, %xmm2, %xmm4
-; XOP-NEXT: vpsrlw %xmm4, %xmm1, %xmm1
-; XOP-NEXT: vpandn %xmm3, %xmm2, %xmm2
-; XOP-NEXT: vpsllw $1, %xmm0, %xmm0
-; XOP-NEXT: vpsllw %xmm2, %xmm0, %xmm0
-; XOP-NEXT: vpor %xmm1, %xmm0, %xmm0
-; XOP-NEXT: retq
+; XOPAVX1-LABEL: splatvar_funnnel_v8i16:
+; XOPAVX1: # %bb.0:
+; XOPAVX1-NEXT: vmovddup {{.*#+}} xmm3 = [15,15]
+; XOPAVX1-NEXT: # xmm3 = mem[0,0]
+; XOPAVX1-NEXT: vandps %xmm3, %xmm2, %xmm4
+; XOPAVX1-NEXT: vpsrlw %xmm4, %xmm1, %xmm1
+; XOPAVX1-NEXT: vandnps %xmm3, %xmm2, %xmm2
+; XOPAVX1-NEXT: vpsllw $1, %xmm0, %xmm0
+; XOPAVX1-NEXT: vpsllw %xmm2, %xmm0, %xmm0
+; XOPAVX1-NEXT: vpor %xmm1, %xmm0, %xmm0
+; XOPAVX1-NEXT: retq
+;
+; XOPAVX2-LABEL: splatvar_funnnel_v8i16:
+; XOPAVX2: # %bb.0:
+; XOPAVX2-NEXT: vpbroadcastq {{.*#+}} xmm3 = [15,15]
+; XOPAVX2-NEXT: vpand %xmm3, %xmm2, %xmm4
+; XOPAVX2-NEXT: vpsrlw %xmm4, %xmm1, %xmm1
+; XOPAVX2-NEXT: vpandn %xmm3, %xmm2, %xmm2
+; XOPAVX2-NEXT: vpsllw $1, %xmm0, %xmm0
+; XOPAVX2-NEXT: vpsllw %xmm2, %xmm0, %xmm0
+; XOPAVX2-NEXT: vpor %xmm1, %xmm0, %xmm0
+; XOPAVX2-NEXT: retq
;
; X86-SSE2-LABEL: splatvar_funnnel_v8i16:
; X86-SSE2: # %bb.0:
diff --git a/llvm/test/CodeGen/X86/vector-fshr-256.ll b/llvm/test/CodeGen/X86/vector-fshr-256.ll
index 12eede8976c98..e24d1d561c21b 100644
--- a/llvm/test/CodeGen/X86/vector-fshr-256.ll
+++ b/llvm/test/CodeGen/X86/vector-fshr-256.ll
@@ -1014,11 +1014,12 @@ define <8 x i32> @splatvar_funnnel_v8i32(<8 x i32> %x, <8 x i32> %y, <8 x i32> %
define <16 x i16> @splatvar_funnnel_v16i16(<16 x i16> %x, <16 x i16> %y, <16 x i16> %amt) nounwind {
; AVX1-LABEL: splatvar_funnnel_v16i16:
; AVX1: # %bb.0:
-; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [15,0,0,0]
-; AVX1-NEXT: vpand %xmm3, %xmm2, %xmm4
+; AVX1-NEXT: vmovddup {{.*#+}} xmm3 = [15,15]
+; AVX1-NEXT: # xmm3 = mem[0,0]
+; AVX1-NEXT: vandps %xmm3, %xmm2, %xmm4
; AVX1-NEXT: vextractf128 $1, %ymm1, %xmm5
; AVX1-NEXT: vpsrlw %xmm4, %xmm5, %xmm5
-; AVX1-NEXT: vpandn %xmm3, %xmm2, %xmm2
+; AVX1-NEXT: vandnps %xmm3, %xmm2, %xmm2
; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm3
; AVX1-NEXT: vpsllw $1, %xmm3, %xmm3
; AVX1-NEXT: vpsllw %xmm2, %xmm3, %xmm3
@@ -1113,11 +1114,12 @@ define <16 x i16> @splatvar_funnnel_v16i16(<16 x i16> %x, <16 x i16> %y, <16 x i
;
; XOPAVX1-LABEL: splatvar_funnnel_v16i16:
; XOPAVX1: # %bb.0:
-; XOPAVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [15,0,0,0]
-; XOPAVX1-NEXT: vpand %xmm3, %xmm2, %xmm4
+; XOPAVX1-NEXT: vmovddup {{.*#+}} xmm3 = [15,15]
+; XOPAVX1-NEXT: # xmm3 = mem[0,0]
+; XOPAVX1-NEXT: vandps %xmm3, %xmm2, %xmm4
; XOPAVX1-NEXT: vextractf128 $1, %ymm1, %xmm5
; XOPAVX1-NEXT: vpsrlw %xmm4, %xmm5, %xmm5
-; XOPAVX1-NEXT: vpandn %xmm3, %xmm2, %xmm2
+; XOPAVX1-NEXT: vandnps %xmm3, %xmm2, %xmm2
; XOPAVX1-NEXT: vextractf128 $1, %ymm0, %xmm3
; XOPAVX1-NEXT: vpsllw $1, %xmm3, %xmm3
; XOPAVX1-NEXT: vpsllw %xmm2, %xmm3, %xmm3
diff --git a/llvm/test/CodeGen/X86/vector-interleaved-load-i16-stride-5.ll b/llvm/test/CodeGen/X86/vector-interleaved-load-i16-stride-5.ll
index 69d7bf38709d4..ee133819d96b5 100644
--- a/llvm/test/CodeGen/X86/vector-interleaved-load-i16-stride-5.ll
+++ b/llvm/test/CodeGen/X86/vector-interleaved-load-i16-stride-5.ll
@@ -319,104 +319,104 @@ define void @vf4(<20 x i16>* %in.vec, <4 x i16>* %out.vec0, <4 x i16>* %out.vec1
define void @vf8(<40 x i16>* %in.vec, <8 x i16>* %out.vec0, <8 x i16>* %out.vec1, <8 x i16>* %out.vec2, <8 x i16>* %out.vec3, <8 x i16>* %out.vec4) nounwind {
; SSE-LABEL: vf8:
; SSE: # %bb.0:
-; SSE-NEXT: movdqa 64(%rdi), %xmm12
-; SSE-NEXT: movdqa (%rdi), %xmm14
-; SSE-NEXT: movdqa 16(%rdi), %xmm1
+; SSE-NEXT: movdqa 64(%rdi), %xmm11
+; SSE-NEXT: movdqa (%rdi), %xmm12
+; SSE-NEXT: movdqa 16(%rdi), %xmm15
; SSE-NEXT: movdqa 32(%rdi), %xmm2
-; SSE-NEXT: movdqa 48(%rdi), %xmm11
-; SSE-NEXT: movdqa {{.*#+}} xmm3 = [65535,65535,65535,65535,0,65535,65535,65535]
-; SSE-NEXT: pshufd {{.*#+}} xmm4 = xmm11[0,1,0,3]
-; SSE-NEXT: pand %xmm3, %xmm4
-; SSE-NEXT: pandn %xmm2, %xmm3
-; SSE-NEXT: por %xmm4, %xmm3
-; SSE-NEXT: pshufd {{.*#+}} xmm4 = xmm1[3,1,2,3]
-; SSE-NEXT: pshuflw {{.*#+}} xmm4 = xmm4[2,1,2,3,4,5,6,7]
-; SSE-NEXT: pshufd {{.*#+}} xmm7 = xmm14[0,2,2,3]
+; SSE-NEXT: movdqa 48(%rdi), %xmm14
+; SSE-NEXT: movdqa {{.*#+}} xmm4 = [65535,65535,65535,65535,0,65535,65535,65535]
+; SSE-NEXT: pshufd {{.*#+}} xmm5 = xmm14[0,1,0,3]
+; SSE-NEXT: pand %xmm4, %xmm5
+; SSE-NEXT: pandn %xmm2, %xmm4
+; SSE-NEXT: por %xmm5, %xmm4
+; SSE-NEXT: pshufd {{.*#+}} xmm5 = xmm15[3,1,2,3]
+; SSE-NEXT: pshuflw {{.*#+}} xmm5 = xmm5[2,1,2,3,4,5,6,7]
+; SSE-NEXT: pshufd {{.*#+}} xmm7 = xmm12[0,2,2,3]
; SSE-NEXT: pshuflw {{.*#+}} xmm7 = xmm7[0,3,2,3,4,5,6,7]
-; SSE-NEXT: punpckldq {{.*#+}} xmm7 = xmm7[0],xmm4[0],xmm7[1],xmm4[1]
-; SSE-NEXT: shufps {{.*#+}} xmm7 = xmm7[0,1],xmm3[2,3]
-; SSE-NEXT: movaps {{.*#+}} xmm3 = [65535,65535,65535,65535,65535,65535,65535,0]
-; SSE-NEXT: andps %xmm3, %xmm7
-; SSE-NEXT: pshufd {{.*#+}} xmm4 = xmm12[0,1,0,1]
-; SSE-NEXT: movaps %xmm3, %xmm10
-; SSE-NEXT: pandn %xmm4, %xmm10
+; SSE-NEXT: punpckldq {{.*#+}} xmm7 = xmm7[0],xmm5[0],xmm7[1],xmm5[1]
+; SSE-NEXT: shufps {{.*#+}} xmm7 = xmm7[0,1],xmm4[2,3]
+; SSE-NEXT: movaps {{.*#+}} xmm4 = [65535,65535,65535,65535,65535,65535,65535,0]
+; SSE-NEXT: andps %xmm4, %xmm7
+; SSE-NEXT: pshufd {{.*#+}} xmm5 = xmm11[0,1,0,1]
+; SSE-NEXT: movaps %xmm4, %xmm10
+; SSE-NEXT: pandn %xmm5, %xmm10
; SSE-NEXT: por %xmm7, %xmm10
-; SSE-NEXT: movdqa %xmm1, %xmm4
-; SSE-NEXT: psrlq $48, %xmm4
-; SSE-NEXT: pshufd {{.*#+}} xmm7 = xmm14[0,3,2,3]
-; SSE-NEXT: pshuflw {{.*#+}} xmm5 = xmm7[1,2,2,3,4,5,6,7]
-; SSE-NEXT: punpckldq {{.*#+}} xmm5 = xmm5[0],xmm4[0],xmm5[1],xmm4[1]
+; SSE-NEXT: movdqa %xmm15, %xmm5
+; SSE-NEXT: psrlq $48, %xmm5
+; SSE-NEXT: pshufd {{.*#+}} xmm7 = xmm12[0,3,2,3]
+; SSE-NEXT: pshuflw {{.*#+}} xmm6 = xmm7[1,2,2,3,4,5,6,7]
+; SSE-NEXT: punpckldq {{.*#+}} xmm6 = xmm6[0],xmm5[0],xmm6[1],xmm5[1]
; SSE-NEXT: movdqa {{.*#+}} xmm7 = [0,0,0,65535,65535,65535,65535,65535]
-; SSE-NEXT: pshufd {{.*#+}} xmm4 = xmm11[1,3,2,3]
-; SSE-NEXT: pshufd {{.*#+}} xmm6 = xmm2[0,2,2,3]
-; SSE-NEXT: punpckldq {{.*#+}} xmm6 = xmm6[0],xmm4[0],xmm6[1],xmm4[1]
-; SSE-NEXT: pshufhw {{.*#+}} xmm4 = xmm6[0,1,2,3,7,5,6,7]
-; SSE-NEXT: pshufd {{.*#+}} xmm4 = xmm4[0,1,2,1]
-; SSE-NEXT: pshuflw {{.*#+}} xmm4 = xmm4[0,0,0,0,4,5,6,7]
-; SSE-NEXT: pshufhw {{.*#+}} xmm4 = xmm4[0,1,2,3,5,6,4,7]
-; SSE-NEXT: pand %xmm7, %xmm4
+; SSE-NEXT: pshufd {{.*#+}} xmm5 = xmm14[1,3,2,3]
+; SSE-NEXT: pshufd {{.*#+}} xmm0 = xmm2[0,2,2,3]
+; SSE-NEXT: punpckldq {{.*#+}} xmm0 = xmm0[0],xmm5[0],xmm0[1],xmm5[1]
+; SSE-NEXT: pshufhw {{.*#+}} xmm0 = xmm0[0,1,2,3,7,5,6,7]
+; SSE-NEXT: pshufd {{.*#+}} xmm0 = xmm0[0,1,2,1]
+; SSE-NEXT: pshuflw {{.*#+}} xmm0 = xmm0[0,0,0,0,4,5,6,7]
+; SSE-NEXT: pshufhw {{.*#+}} xmm0 = xmm0[0,1,2,3,5,6,4,7]
+; SSE-NEXT: pand %xmm7, %xmm0
+; SSE-NEXT: pandn %xmm6, %xmm7
+; SSE-NEXT: por %xmm0, %xmm7
+; SSE-NEXT: pand %xmm4, %xmm7
+; SSE-NEXT: pshufd {{.*#+}} xmm8 = xmm11[0,1,2,0]
+; SSE-NEXT: pshufd {{.*#+}} xmm9 = xmm11[0,1,0,3]
+; SSE-NEXT: pshufd {{.*#+}} xmm13 = xmm11[0,1,1,3]
+; SSE-NEXT: psllq $48, %xmm11
+; SSE-NEXT: pandn %xmm11, %xmm4
+; SSE-NEXT: por %xmm7, %xmm4
+; SSE-NEXT: pshufd {{.*#+}} xmm5 = xmm2[0,0,2,3]
+; SSE-NEXT: movdqa {{.*#+}} xmm6 = [65535,65535,65535,0,0,0,65535,65535]
+; SSE-NEXT: movdqa %xmm6, %xmm7
; SSE-NEXT: pandn %xmm5, %xmm7
-; SSE-NEXT: por %xmm4, %xmm7
-; SSE-NEXT: pand %xmm3, %xmm7
-; SSE-NEXT: pshufd {{.*#+}} xmm8 = xmm12[0,1,2,0]
-; SSE-NEXT: pshufd {{.*#+}} xmm9 = xmm12[0,1,0,3]
-; SSE-NEXT: pshufd {{.*#+}} xmm13 = xmm12[0,1,1,3]
-; SSE-NEXT: psllq $48, %xmm12
-; SSE-NEXT: pandn %xmm12, %xmm3
-; SSE-NEXT: por %xmm7, %xmm3
-; SSE-NEXT: pshufd {{.*#+}} xmm5 = xmm14[0,1,1,3]
+; SSE-NEXT: pshufd {{.*#+}} xmm5 = xmm12[0,1,1,3]
; SSE-NEXT: pshufhw {{.*#+}} xmm5 = xmm5[0,1,2,3,4,7,6,7]
-; SSE-NEXT: punpckhdq {{.*#+}} xmm5 = xmm5[2],xmm1[2],xmm5[3],xmm1[3]
-; SSE-NEXT: movdqa {{.*#+}} xmm6 = [65535,65535,65535,0,0,0,65535,65535]
+; SSE-NEXT: punpckhdq {{.*#+}} xmm5 = xmm5[2],xmm15[2],xmm5[3],xmm15[3]
; SSE-NEXT: pand %xmm6, %xmm5
-; SSE-NEXT: movdqa %xmm11, %xmm7
-; SSE-NEXT: pshufd {{.*#+}} xmm12 = xmm11[0,2,2,3]
-; SSE-NEXT: shufps {{.*#+}} xmm11 = xmm11[1,0],xmm2[0,0]
-; SSE-NEXT: shufps {{.*#+}} xmm11 = xmm11[2,0],xmm2[2,3]
-; SSE-NEXT: shufps {{.*#+}} xmm11 = xmm11[0,1,1,3]
-; SSE-NEXT: pshuflw {{.*#+}} xmm0 = xmm11[1,1,1,1,4,5,6,7]
-; SSE-NEXT: pshufhw {{.*#+}} xmm0 = xmm0[0,1,2,3,6,5,6,7]
-; SSE-NEXT: movdqa %xmm6, %xmm4
-; SSE-NEXT: pandn %xmm0, %xmm4
-; SSE-NEXT: por %xmm5, %xmm4
-; SSE-NEXT: pshufhw {{.*#+}} xmm5 = xmm8[0,1,2,3,4,5,6,5]
-; SSE-NEXT: shufps {{.*#+}} xmm5 = xmm5[3,1],xmm0[2,3]
-; SSE-NEXT: shufps {{.*#+}} xmm4 = xmm4[0,1],xmm5[2,0]
-; SSE-NEXT: shufps {{.*#+}} xmm7 = xmm7[2,0],xmm2[3,0]
-; SSE-NEXT: pshufd {{.*#+}} xmm0 = xmm2[1,1,1,1]
-; SSE-NEXT: shufps {{.*#+}} xmm2 = xmm2[0,1],xmm7[0,2]
-; SSE-NEXT: pshuflw {{.*#+}} xmm2 = xmm2[2,2,2,2,4,5,6,7]
-; SSE-NEXT: pshufhw {{.*#+}} xmm2 = xmm2[0,1,2,3,7,4,6,7]
-; SSE-NEXT: pshufd {{.*#+}} xmm5 = xmm14[1,1,1,1]
-; SSE-NEXT: pshufd {{.*#+}} xmm7 = xmm1[0,2,2,3]
-; SSE-NEXT: punpckldq {{.*#+}} xmm7 = xmm7[0],xmm5[0],xmm7[1],xmm5[1]
-; SSE-NEXT: movdqa %xmm6, %xmm5
-; SSE-NEXT: pandn %xmm2, %xmm5
-; SSE-NEXT: pshuflw {{.*#+}} xmm7 = xmm7[0,3,2,3,4,5,6,7]
-; SSE-NEXT: pshufd {{.*#+}} xmm7 = xmm7[0,2,2,3]
-; SSE-NEXT: pshuflw {{.*#+}} xmm7 = xmm7[1,0,3,3,4,5,6,7]
-; SSE-NEXT: pand %xmm6, %xmm7
-; SSE-NEXT: por %xmm5, %xmm7
-; SSE-NEXT: pshufhw {{.*#+}} xmm5 = xmm9[0,1,2,3,4,5,5,6]
-; SSE-NEXT: shufps {{.*#+}} xmm5 = xmm5[3,1],xmm2[2,3]
-; SSE-NEXT: shufps {{.*#+}} xmm7 = xmm7[0,1],xmm5[2,0]
-; SSE-NEXT: pshuflw {{.*#+}} xmm2 = xmm12[0,1,0,3,4,5,6,7]
-; SSE-NEXT: pshufhw {{.*#+}} xmm5 = xmm13[0,1,2,3,4,5,4,7]
-; SSE-NEXT: shufps {{.*#+}} xmm5 = xmm5[3,1],xmm2[1,3]
-; SSE-NEXT: punpckldq {{.*#+}} xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
-; SSE-NEXT: shufps {{.*#+}} xmm14 = xmm14[2,0],xmm1[3,0]
-; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[0,1],xmm14[0,2]
-; SSE-NEXT: pshufhw {{.*#+}} xmm0 = xmm1[0,1,2,3,4,6,6,7]
+; SSE-NEXT: por %xmm7, %xmm5
+; SSE-NEXT: movdqa %xmm14, %xmm7
+; SSE-NEXT: shufps {{.*#+}} xmm7 = xmm7[1,0],xmm2[0,0]
+; SSE-NEXT: shufps {{.*#+}} xmm7 = xmm7[2,0],xmm2[2,3]
+; SSE-NEXT: shufps {{.*#+}} xmm7 = xmm7[0,1,1,3]
+; SSE-NEXT: pshufhw {{.*#+}} xmm7 = xmm7[0,1,2,3,6,5,6,7]
+; SSE-NEXT: pshufhw {{.*#+}} xmm0 = xmm8[0,1,2,3,4,5,6,5]
+; SSE-NEXT: shufps {{.*#+}} xmm0 = xmm0[3,1],xmm7[2,3]
+; SSE-NEXT: shufps {{.*#+}} xmm5 = xmm5[0,1],xmm0[2,0]
+; SSE-NEXT: pshuflw {{.*#+}} xmm0 = xmm2[2,2,2,2,4,5,6,7]
+; SSE-NEXT: movdqa %xmm6, %xmm7
+; SSE-NEXT: pandn %xmm0, %xmm7
+; SSE-NEXT: pshufd {{.*#+}} xmm0 = xmm12[1,1,1,1]
+; SSE-NEXT: pshufd {{.*#+}} xmm3 = xmm15[0,2,2,3]
+; SSE-NEXT: punpckldq {{.*#+}} xmm3 = xmm3[0],xmm0[0],xmm3[1],xmm0[1]
+; SSE-NEXT: pshuflw {{.*#+}} xmm0 = xmm3[0,3,2,3,4,5,6,7]
; SSE-NEXT: pshufd {{.*#+}} xmm0 = xmm0[0,2,2,3]
-; SSE-NEXT: pshuflw {{.*#+}} xmm0 = xmm0[2,1,3,3,4,5,6,7]
+; SSE-NEXT: pshuflw {{.*#+}} xmm0 = xmm0[1,0,3,3,4,5,6,7]
; SSE-NEXT: pand %xmm6, %xmm0
-; SSE-NEXT: pandn %xmm2, %xmm6
-; SSE-NEXT: por %xmm0, %xmm6
-; SSE-NEXT: shufps {{.*#+}} xmm6 = xmm6[0,1],xmm5[2,0]
+; SSE-NEXT: por %xmm7, %xmm0
+; SSE-NEXT: pshufd {{.*#+}} xmm3 = xmm14[0,2,2,3]
+; SSE-NEXT: shufps {{.*#+}} xmm14 = xmm14[2,0],xmm2[3,0]
+; SSE-NEXT: pshufd {{.*#+}} xmm7 = xmm2[1,1,1,1]
+; SSE-NEXT: shufps {{.*#+}} xmm2 = xmm2[0,1],xmm14[0,2]
+; SSE-NEXT: pshufhw {{.*#+}} xmm2 = xmm2[0,1,2,3,7,4,6,7]
+; SSE-NEXT: pshufhw {{.*#+}} xmm1 = xmm9[0,1,2,3,4,5,5,6]
+; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[3,1],xmm2[2,3]
+; SSE-NEXT: shufps {{.*#+}} xmm0 = xmm0[0,1],xmm1[2,0]
+; SSE-NEXT: pshuflw {{.*#+}} xmm1 = xmm3[0,1,0,3,4,5,6,7]
+; SSE-NEXT: pshufhw {{.*#+}} xmm2 = xmm13[0,1,2,3,4,5,4,7]
+; SSE-NEXT: shufps {{.*#+}} xmm2 = xmm2[3,1],xmm1[1,3]
+; SSE-NEXT: punpckldq {{.*#+}} xmm1 = xmm1[0],xmm7[0],xmm1[1],xmm7[1]
+; SSE-NEXT: shufps {{.*#+}} xmm12 = xmm12[2,0],xmm15[3,0]
+; SSE-NEXT: shufps {{.*#+}} xmm15 = xmm15[0,1],xmm12[0,2]
+; SSE-NEXT: pshufhw {{.*#+}} xmm3 = xmm15[0,1,2,3,4,6,6,7]
+; SSE-NEXT: pshufd {{.*#+}} xmm3 = xmm3[0,2,2,3]
+; SSE-NEXT: pshuflw {{.*#+}} xmm3 = xmm3[2,1,3,3,4,5,6,7]
+; SSE-NEXT: pand %xmm6, %xmm3
+; SSE-NEXT: pandn %xmm1, %xmm6
+; SSE-NEXT: por %xmm3, %xmm6
+; SSE-NEXT: shufps {{.*#+}} xmm6 = xmm6[0,1],xmm2[2,0]
; SSE-NEXT: movdqa %xmm10, (%rsi)
-; SSE-NEXT: movdqa %xmm3, (%rdx)
-; SSE-NEXT: movaps %xmm4, (%rcx)
-; SSE-NEXT: movaps %xmm7, (%r8)
+; SSE-NEXT: movdqa %xmm4, (%rdx)
+; SSE-NEXT: movaps %xmm5, (%rcx)
+; SSE-NEXT: movaps %xmm0, (%r8)
; SSE-NEXT: movaps %xmm6, (%r9)
; SSE-NEXT: retq
;
@@ -659,68 +659,68 @@ define void @vf8(<40 x i16>* %in.vec, <8 x i16>* %out.vec0, <8 x i16>* %out.vec1
define void @vf16(<80 x i16>* %in.vec, <16 x i16>* %out.vec0, <16 x i16>* %out.vec1, <16 x i16>* %out.vec2, <16 x i16>* %out.vec3, <16 x i16>* %out.vec4) nounwind {
; SSE-LABEL: vf16:
; SSE: # %bb.0:
-; SSE-NEXT: subq $40, %rsp
-; SSE-NEXT: movdqa 144(%rdi), %xmm9
-; SSE-NEXT: movdqa 80(%rdi), %xmm11
-; SSE-NEXT: movaps 96(%rdi), %xmm0
-; SSE-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
+; SSE-NEXT: subq $24, %rsp
+; SSE-NEXT: movdqa 144(%rdi), %xmm13
+; SSE-NEXT: movdqa 80(%rdi), %xmm7
+; SSE-NEXT: movdqa 96(%rdi), %xmm14
; SSE-NEXT: movdqa 128(%rdi), %xmm5
-; SSE-NEXT: movdqa 112(%rdi), %xmm14
-; SSE-NEXT: movdqa 64(%rdi), %xmm6
-; SSE-NEXT: movdqa (%rdi), %xmm8
-; SSE-NEXT: movdqa 16(%rdi), %xmm15
-; SSE-NEXT: movdqa 32(%rdi), %xmm13
-; SSE-NEXT: movdqa 48(%rdi), %xmm12
+; SSE-NEXT: movdqa 112(%rdi), %xmm11
+; SSE-NEXT: movdqa 64(%rdi), %xmm4
+; SSE-NEXT: movdqa (%rdi), %xmm6
+; SSE-NEXT: movdqa 16(%rdi), %xmm12
+; SSE-NEXT: movdqa 32(%rdi), %xmm9
+; SSE-NEXT: movdqa 48(%rdi), %xmm3
; SSE-NEXT: movdqa {{.*#+}} xmm0 = [65535,65535,65535,65535,0,65535,65535,65535]
; SSE-NEXT: movdqa %xmm0, %xmm1
-; SSE-NEXT: pandn %xmm13, %xmm1
-; SSE-NEXT: pshufd {{.*#+}} xmm2 = xmm12[0,1,0,3]
-; SSE-NEXT: movdqa %xmm12, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
+; SSE-NEXT: pandn %xmm9, %xmm1
+; SSE-NEXT: pshufd {{.*#+}} xmm2 = xmm3[0,1,0,3]
+; SSE-NEXT: movdqa %xmm3, %xmm8
; SSE-NEXT: pand %xmm0, %xmm2
; SSE-NEXT: por %xmm1, %xmm2
-; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm15[3,1,2,3]
+; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm12[3,1,2,3]
; SSE-NEXT: pshuflw {{.*#+}} xmm1 = xmm1[2,1,2,3,4,5,6,7]
-; SSE-NEXT: pshufd {{.*#+}} xmm3 = xmm8[0,2,2,3]
+; SSE-NEXT: pshufd {{.*#+}} xmm3 = xmm6[0,2,2,3]
+; SSE-NEXT: movdqa %xmm6, %xmm15
; SSE-NEXT: pshuflw {{.*#+}} xmm3 = xmm3[0,3,2,3,4,5,6,7]
; SSE-NEXT: punpckldq {{.*#+}} xmm3 = xmm3[0],xmm1[0],xmm3[1],xmm1[1]
; SSE-NEXT: shufps {{.*#+}} xmm3 = xmm3[0,1],xmm2[2,3]
; SSE-NEXT: movaps {{.*#+}} xmm10 = [65535,65535,65535,65535,65535,65535,65535,0]
; SSE-NEXT: andps %xmm10, %xmm3
-; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm6[0,1,0,1]
+; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm4[0,1,0,1]
; SSE-NEXT: movaps %xmm10, %xmm2
; SSE-NEXT: pandn %xmm1, %xmm2
; SSE-NEXT: por %xmm3, %xmm2
-; SSE-NEXT: movdqa %xmm2, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
+; SSE-NEXT: movdqa %xmm2, (%rsp) # 16-byte Spill
; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm5[0,1,0,3]
+; SSE-NEXT: movdqa %xmm5, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
; SSE-NEXT: pand %xmm0, %xmm1
-; SSE-NEXT: pandn %xmm14, %xmm0
-; SSE-NEXT: movdqa %xmm14, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
+; SSE-NEXT: pandn %xmm11, %xmm0
; SSE-NEXT: por %xmm1, %xmm0
-; SSE-NEXT: movdqa {{[-0-9]+}}(%r{{[sb]}}p), %xmm4 # 16-byte Reload
-; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm4[3,1,2,3]
+; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm14[3,1,2,3]
; SSE-NEXT: pshuflw {{.*#+}} xmm1 = xmm1[2,1,2,3,4,5,6,7]
-; SSE-NEXT: pshufd {{.*#+}} xmm2 = xmm11[0,2,2,3]
-; SSE-NEXT: movdqa %xmm11, %xmm7
+; SSE-NEXT: pshufd {{.*#+}} xmm2 = xmm7[0,2,2,3]
; SSE-NEXT: pshuflw {{.*#+}} xmm2 = xmm2[0,3,2,3,4,5,6,7]
; SSE-NEXT: punpckldq {{.*#+}} xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
; SSE-NEXT: shufps {{.*#+}} xmm2 = xmm2[0,1],xmm0[2,3]
; SSE-NEXT: andps %xmm10, %xmm2
-; SSE-NEXT: pshufd {{.*#+}} xmm0 = xmm9[0,1,0,1]
-; SSE-NEXT: movdqa %xmm9, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
+; SSE-NEXT: pshufd {{.*#+}} xmm0 = xmm13[0,1,0,1]
+; SSE-NEXT: movdqa %xmm13, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
; SSE-NEXT: movaps %xmm10, %xmm1
; SSE-NEXT: andnps %xmm0, %xmm1
; SSE-NEXT: orps %xmm2, %xmm1
-; SSE-NEXT: movaps %xmm1, (%rsp) # 16-byte Spill
-; SSE-NEXT: movdqa %xmm15, %xmm0
+; SSE-NEXT: movaps %xmm1, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
+; SSE-NEXT: movdqa %xmm12, %xmm0
; SSE-NEXT: psrlq $48, %xmm0
-; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm8[0,3,2,3]
+; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm6[0,3,2,3]
; SSE-NEXT: pshuflw {{.*#+}} xmm1 = xmm1[1,2,2,3,4,5,6,7]
; SSE-NEXT: punpckldq {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
; SSE-NEXT: movdqa {{.*#+}} xmm0 = [0,0,0,65535,65535,65535,65535,65535]
; SSE-NEXT: movdqa %xmm0, %xmm2
; SSE-NEXT: pandn %xmm1, %xmm2
-; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm12[1,3,2,3]
-; SSE-NEXT: pshufd {{.*#+}} xmm3 = xmm13[0,2,2,3]
+; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm8[1,3,2,3]
+; SSE-NEXT: movdqa %xmm8, %xmm6
+; SSE-NEXT: movdqa %xmm8, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
+; SSE-NEXT: pshufd {{.*#+}} xmm3 = xmm9[0,2,2,3]
; SSE-NEXT: punpckldq {{.*#+}} xmm3 = xmm3[0],xmm1[0],xmm3[1],xmm1[1]
; SSE-NEXT: pshufhw {{.*#+}} xmm1 = xmm3[0,1,2,3,7,5,6,7]
; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm1[0,1,2,1]
@@ -728,22 +728,20 @@ define void @vf16(<80 x i16>* %in.vec, <16 x i16>* %out.vec0, <16 x i16>* %out.v
; SSE-NEXT: pshufhw {{.*#+}} xmm1 = xmm1[0,1,2,3,5,6,4,7]
; SSE-NEXT: pand %xmm0, %xmm1
; SSE-NEXT: por %xmm2, %xmm1
-; SSE-NEXT: movdqa %xmm6, %xmm2
+; SSE-NEXT: movdqa %xmm4, %xmm2
; SSE-NEXT: psllq $48, %xmm2
; SSE-NEXT: movaps %xmm10, %xmm3
; SSE-NEXT: andnps %xmm2, %xmm3
; SSE-NEXT: pand %xmm10, %xmm1
; SSE-NEXT: orps %xmm1, %xmm3
; SSE-NEXT: movaps %xmm3, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
-; SSE-NEXT: movdqa %xmm4, %xmm1
-; SSE-NEXT: movdqa %xmm4, %xmm11
+; SSE-NEXT: movdqa %xmm14, %xmm1
; SSE-NEXT: psrlq $48, %xmm1
; SSE-NEXT: pshufd {{.*#+}} xmm2 = xmm7[0,3,2,3]
; SSE-NEXT: pshuflw {{.*#+}} xmm2 = xmm2[1,2,2,3,4,5,6,7]
; SSE-NEXT: punpckldq {{.*#+}} xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
-; SSE-NEXT: movdqa %xmm5, %xmm4
; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm5[1,3,2,3]
-; SSE-NEXT: pshufd {{.*#+}} xmm3 = xmm14[0,2,2,3]
+; SSE-NEXT: pshufd {{.*#+}} xmm3 = xmm11[0,2,2,3]
; SSE-NEXT: punpckldq {{.*#+}} xmm3 = xmm3[0],xmm1[0],xmm3[1],xmm1[1]
; SSE-NEXT: pshufhw {{.*#+}} xmm1 = xmm3[0,1,2,3,7,5,6,7]
; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm1[0,1,2,1]
@@ -753,148 +751,144 @@ define void @vf16(<80 x i16>* %in.vec, <16 x i16>* %out.vec0, <16 x i16>* %out.v
; SSE-NEXT: pandn %xmm2, %xmm0
; SSE-NEXT: por %xmm1, %xmm0
; SSE-NEXT: pand %xmm10, %xmm0
-; SSE-NEXT: movdqa %xmm9, %xmm1
+; SSE-NEXT: movdqa %xmm13, %xmm1
; SSE-NEXT: psllq $48, %xmm1
; SSE-NEXT: pandn %xmm1, %xmm10
; SSE-NEXT: por %xmm0, %xmm10
-; SSE-NEXT: pshufd {{.*#+}} xmm0 = xmm8[0,1,1,3]
-; SSE-NEXT: movdqa %xmm8, %xmm12
-; SSE-NEXT: movdqa %xmm8, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
-; SSE-NEXT: pshufhw {{.*#+}} xmm1 = xmm0[0,1,2,3,4,7,6,7]
-; SSE-NEXT: punpckhdq {{.*#+}} xmm1 = xmm1[2],xmm15[2],xmm1[3],xmm15[3]
+; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm9[0,0,2,3]
; SSE-NEXT: movdqa {{.*#+}} xmm5 = [65535,65535,65535,0,0,0,65535,65535]
-; SSE-NEXT: pand %xmm5, %xmm1
-; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 16-byte Reload
-; SSE-NEXT: movaps %xmm0, %xmm2
-; SSE-NEXT: movdqa %xmm13, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
-; SSE-NEXT: shufps {{.*#+}} xmm2 = xmm2[1,0],xmm13[0,0]
-; SSE-NEXT: shufps {{.*#+}} xmm2 = xmm2[2,0],xmm13[2,3]
-; SSE-NEXT: shufps {{.*#+}} xmm2 = xmm2[0,1,1,3]
-; SSE-NEXT: pshuflw {{.*#+}} xmm2 = xmm2[1,1,1,1,4,5,6,7]
-; SSE-NEXT: pshufhw {{.*#+}} xmm2 = xmm2[0,1,2,3,6,5,6,7]
-; SSE-NEXT: movdqa %xmm5, %xmm14
-; SSE-NEXT: pandn %xmm2, %xmm14
-; SSE-NEXT: por %xmm1, %xmm14
-; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm6[0,1,2,0]
-; SSE-NEXT: movdqa %xmm6, %xmm9
-; SSE-NEXT: pshufhw {{.*#+}} xmm1 = xmm1[0,1,2,3,4,5,6,5]
-; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[3,1],xmm2[2,3]
-; SSE-NEXT: shufps {{.*#+}} xmm14 = xmm14[0,1],xmm1[2,0]
-; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm7[0,1,1,3]
-; SSE-NEXT: movdqa %xmm7, %xmm13
-; SSE-NEXT: pshufhw {{.*#+}} xmm1 = xmm1[0,1,2,3,4,7,6,7]
-; SSE-NEXT: punpckhdq {{.*#+}} xmm1 = xmm1[2],xmm11[2],xmm1[3],xmm11[3]
-; SSE-NEXT: pand %xmm5, %xmm1
-; SSE-NEXT: movdqa %xmm4, %xmm2
-; SSE-NEXT: movdqa %xmm4, %xmm8
+; SSE-NEXT: movdqa %xmm5, %xmm2
+; SSE-NEXT: pandn %xmm1, %xmm2
+; SSE-NEXT: movdqa %xmm15, %xmm8
+; SSE-NEXT: movdqa %xmm15, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
+; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm15[0,1,1,3]
+; SSE-NEXT: pshufhw {{.*#+}} xmm13 = xmm1[0,1,2,3,4,7,6,7]
+; SSE-NEXT: punpckhdq {{.*#+}} xmm13 = xmm13[2],xmm12[2],xmm13[3],xmm12[3]
+; SSE-NEXT: pand %xmm5, %xmm13
+; SSE-NEXT: por %xmm2, %xmm13
+; SSE-NEXT: movdqa %xmm6, %xmm1
+; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[1,0],xmm9[0,0]
+; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[2,0],xmm9[2,3]
+; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[0,1,1,3]
+; SSE-NEXT: pshufhw {{.*#+}} xmm1 = xmm1[0,1,2,3,6,5,6,7]
+; SSE-NEXT: pshufd {{.*#+}} xmm2 = xmm4[0,1,2,0]
; SSE-NEXT: movdqa %xmm4, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
-; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm4 # 16-byte Reload
-; SSE-NEXT: shufps {{.*#+}} xmm2 = xmm2[1,0],xmm4[0,0]
-; SSE-NEXT: shufps {{.*#+}} xmm2 = xmm2[2,0],xmm4[2,3]
-; SSE-NEXT: shufps {{.*#+}} xmm2 = xmm2[0,1,1,3]
-; SSE-NEXT: pshuflw {{.*#+}} xmm2 = xmm2[1,1,1,1,4,5,6,7]
-; SSE-NEXT: pshufhw {{.*#+}} xmm2 = xmm2[0,1,2,3,6,5,6,7]
+; SSE-NEXT: pshufhw {{.*#+}} xmm2 = xmm2[0,1,2,3,4,5,6,5]
+; SSE-NEXT: shufps {{.*#+}} xmm2 = xmm2[3,1],xmm1[2,3]
+; SSE-NEXT: shufps {{.*#+}} xmm13 = xmm13[0,1],xmm2[2,0]
+; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm11[0,0,2,3]
; SSE-NEXT: movdqa %xmm5, %xmm3
-; SSE-NEXT: pandn %xmm2, %xmm3
-; SSE-NEXT: por %xmm1, %xmm3
-; SSE-NEXT: movdqa {{[-0-9]+}}(%r{{[sb]}}p), %xmm7 # 16-byte Reload
-; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm7[0,1,2,0]
-; SSE-NEXT: pshufhw {{.*#+}} xmm1 = xmm1[0,1,2,3,4,5,6,5]
-; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[3,1],xmm2[2,3]
-; SSE-NEXT: shufps {{.*#+}} xmm3 = xmm3[0,1],xmm1[2,0]
-; SSE-NEXT: movaps %xmm0, %xmm1
-; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm11 # 16-byte Reload
-; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[2,0],xmm11[3,0]
-; SSE-NEXT: movaps %xmm11, %xmm2
-; SSE-NEXT: shufps {{.*#+}} xmm2 = xmm2[0,1],xmm1[0,2]
-; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm12[1,1,1,1]
-; SSE-NEXT: pshufd {{.*#+}} xmm0 = xmm15[0,2,2,3]
-; SSE-NEXT: punpckldq {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
-; SSE-NEXT: pshuflw {{.*#+}} xmm1 = xmm2[2,2,2,2,4,5,6,7]
-; SSE-NEXT: pshufhw {{.*#+}} xmm1 = xmm1[0,1,2,3,7,4,6,7]
-; SSE-NEXT: movdqa %xmm5, %xmm6
-; SSE-NEXT: pandn %xmm1, %xmm6
-; SSE-NEXT: pshuflw {{.*#+}} xmm0 = xmm0[0,3,2,3,4,5,6,7]
-; SSE-NEXT: pshufd {{.*#+}} xmm0 = xmm0[0,2,2,3]
-; SSE-NEXT: pshuflw {{.*#+}} xmm12 = xmm0[1,0,3,3,4,5,6,7]
-; SSE-NEXT: pand %xmm5, %xmm12
-; SSE-NEXT: por %xmm6, %xmm12
-; SSE-NEXT: pshufd {{.*#+}} xmm0 = xmm9[0,1,0,3]
-; SSE-NEXT: pshufhw {{.*#+}} xmm0 = xmm0[0,1,2,3,4,5,5,6]
-; SSE-NEXT: shufps {{.*#+}} xmm0 = xmm0[3,1],xmm1[2,3]
-; SSE-NEXT: shufps {{.*#+}} xmm12 = xmm12[0,1],xmm0[2,0]
-; SSE-NEXT: movdqa %xmm8, %xmm0
-; SSE-NEXT: shufps {{.*#+}} xmm0 = xmm0[2,0],xmm4[3,0]
-; SSE-NEXT: movaps %xmm4, %xmm1
-; SSE-NEXT: movaps %xmm4, %xmm8
+; SSE-NEXT: pandn %xmm1, %xmm3
+; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm7[0,1,1,3]
+; SSE-NEXT: movdqa %xmm7, %xmm15
+; SSE-NEXT: movdqa %xmm7, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
+; SSE-NEXT: pshufhw {{.*#+}} xmm2 = xmm1[0,1,2,3,4,7,6,7]
+; SSE-NEXT: punpckhdq {{.*#+}} xmm2 = xmm2[2],xmm14[2],xmm2[3],xmm14[3]
+; SSE-NEXT: pand %xmm5, %xmm2
+; SSE-NEXT: por %xmm3, %xmm2
+; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm7 # 16-byte Reload
+; SSE-NEXT: movaps %xmm7, %xmm1
+; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[1,0],xmm11[0,0]
+; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[2,0],xmm11[2,3]
+; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[0,1,1,3]
+; SSE-NEXT: pshufhw {{.*#+}} xmm1 = xmm1[0,1,2,3,6,5,6,7]
+; SSE-NEXT: movdqa {{[-0-9]+}}(%r{{[sb]}}p), %xmm6 # 16-byte Reload
+; SSE-NEXT: pshufd {{.*#+}} xmm3 = xmm6[0,1,2,0]
+; SSE-NEXT: pshufhw {{.*#+}} xmm3 = xmm3[0,1,2,3,4,5,6,5]
+; SSE-NEXT: shufps {{.*#+}} xmm3 = xmm3[3,1],xmm1[2,3]
+; SSE-NEXT: shufps {{.*#+}} xmm2 = xmm2[0,1],xmm3[2,0]
+; SSE-NEXT: pshuflw {{.*#+}} xmm1 = xmm9[2,2,2,2,4,5,6,7]
+; SSE-NEXT: movdqa %xmm5, %xmm0
+; SSE-NEXT: pandn %xmm1, %xmm0
+; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm8[1,1,1,1]
+; SSE-NEXT: pshufd {{.*#+}} xmm3 = xmm12[0,2,2,3]
+; SSE-NEXT: punpckldq {{.*#+}} xmm3 = xmm3[0],xmm1[0],xmm3[1],xmm1[1]
+; SSE-NEXT: pshuflw {{.*#+}} xmm1 = xmm3[0,3,2,3,4,5,6,7]
+; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm1[0,2,2,3]
+; SSE-NEXT: pshuflw {{.*#+}} xmm3 = xmm1[1,0,3,3,4,5,6,7]
+; SSE-NEXT: pand %xmm5, %xmm3
+; SSE-NEXT: por %xmm0, %xmm3
+; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm8 # 16-byte Reload
+; SSE-NEXT: movaps %xmm8, %xmm0
+; SSE-NEXT: shufps {{.*#+}} xmm0 = xmm0[2,0],xmm9[3,0]
+; SSE-NEXT: movaps %xmm9, %xmm1
; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[0,1],xmm0[0,2]
-; SSE-NEXT: pshufd {{.*#+}} xmm0 = xmm13[1,1,1,1]
-; SSE-NEXT: movdqa {{[-0-9]+}}(%r{{[sb]}}p), %xmm2 # 16-byte Reload
-; SSE-NEXT: pshufd {{.*#+}} xmm6 = xmm2[0,2,2,3]
-; SSE-NEXT: punpckldq {{.*#+}} xmm6 = xmm6[0],xmm0[0],xmm6[1],xmm0[1]
-; SSE-NEXT: pshuflw {{.*#+}} xmm0 = xmm1[2,2,2,2,4,5,6,7]
-; SSE-NEXT: pshufhw {{.*#+}} xmm0 = xmm0[0,1,2,3,7,4,6,7]
+; SSE-NEXT: pshufhw {{.*#+}} xmm0 = xmm1[0,1,2,3,7,4,6,7]
+; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm4[0,1,0,3]
+; SSE-NEXT: pshufhw {{.*#+}} xmm1 = xmm1[0,1,2,3,4,5,5,6]
+; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[3,1],xmm0[2,3]
+; SSE-NEXT: shufps {{.*#+}} xmm3 = xmm3[0,1],xmm1[2,0]
+; SSE-NEXT: pshuflw {{.*#+}} xmm0 = xmm11[2,2,2,2,4,5,6,7]
; SSE-NEXT: movdqa %xmm5, %xmm4
; SSE-NEXT: pandn %xmm0, %xmm4
-; SSE-NEXT: pshuflw {{.*#+}} xmm1 = xmm6[0,3,2,3,4,5,6,7]
-; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm1[0,2,2,3]
-; SSE-NEXT: pshuflw {{.*#+}} xmm1 = xmm1[1,0,3,3,4,5,6,7]
+; SSE-NEXT: pshufd {{.*#+}} xmm0 = xmm15[1,1,1,1]
+; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm14[0,2,2,3]
+; SSE-NEXT: punpckldq {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
+; SSE-NEXT: pshuflw {{.*#+}} xmm0 = xmm1[0,3,2,3,4,5,6,7]
+; SSE-NEXT: pshufd {{.*#+}} xmm0 = xmm0[0,2,2,3]
+; SSE-NEXT: pshuflw {{.*#+}} xmm1 = xmm0[1,0,3,3,4,5,6,7]
; SSE-NEXT: pand %xmm5, %xmm1
; SSE-NEXT: por %xmm4, %xmm1
-; SSE-NEXT: pshufd {{.*#+}} xmm4 = xmm7[0,1,0,3]
+; SSE-NEXT: movaps %xmm7, %xmm0
+; SSE-NEXT: movaps %xmm7, %xmm15
+; SSE-NEXT: shufps {{.*#+}} xmm0 = xmm0[2,0],xmm11[3,0]
+; SSE-NEXT: movaps %xmm11, %xmm4
+; SSE-NEXT: shufps {{.*#+}} xmm4 = xmm4[0,1],xmm0[0,2]
+; SSE-NEXT: pshufhw {{.*#+}} xmm0 = xmm4[0,1,2,3,7,4,6,7]
+; SSE-NEXT: pshufd {{.*#+}} xmm4 = xmm6[0,1,0,3]
; SSE-NEXT: pshufhw {{.*#+}} xmm4 = xmm4[0,1,2,3,4,5,5,6]
; SSE-NEXT: shufps {{.*#+}} xmm4 = xmm4[3,1],xmm0[2,3]
; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[0,1],xmm4[2,0]
-; SSE-NEXT: pshufd {{.*#+}} xmm0 = xmm11[1,1,1,1]
-; SSE-NEXT: pshufd $232, {{[-0-9]+}}(%r{{[sb]}}p), %xmm4 # 16-byte Folded Reload
-; SSE-NEXT: # xmm4 = mem[0,2,2,3]
-; SSE-NEXT: pshufd {{.*#+}} xmm6 = xmm9[0,1,1,3]
+; SSE-NEXT: pshufd {{.*#+}} xmm0 = xmm9[1,1,1,1]
+; SSE-NEXT: pshufd {{.*#+}} xmm4 = xmm8[0,2,2,3]
+; SSE-NEXT: pshufd $212, {{[-0-9]+}}(%r{{[sb]}}p), %xmm7 # 16-byte Folded Reload
+; SSE-NEXT: # xmm7 = mem[0,1,1,3]
; SSE-NEXT: pshuflw {{.*#+}} xmm4 = xmm4[0,1,0,3,4,5,6,7]
-; SSE-NEXT: pshufhw {{.*#+}} xmm6 = xmm6[0,1,2,3,4,5,4,7]
-; SSE-NEXT: shufps {{.*#+}} xmm6 = xmm6[3,1],xmm4[1,3]
+; SSE-NEXT: pshufhw {{.*#+}} xmm7 = xmm7[0,1,2,3,4,5,4,7]
+; SSE-NEXT: shufps {{.*#+}} xmm7 = xmm7[3,1],xmm4[1,3]
; SSE-NEXT: punpckldq {{.*#+}} xmm4 = xmm4[0],xmm0[0],xmm4[1],xmm0[1]
; SSE-NEXT: movdqa %xmm5, %xmm0
; SSE-NEXT: pandn %xmm4, %xmm0
; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm4 # 16-byte Reload
-; SSE-NEXT: shufps {{.*#+}} xmm4 = xmm4[2,0],xmm15[3,0]
-; SSE-NEXT: shufps {{.*#+}} xmm15 = xmm15[0,1],xmm4[0,2]
-; SSE-NEXT: pshufhw {{.*#+}} xmm4 = xmm15[0,1,2,3,4,6,6,7]
+; SSE-NEXT: shufps {{.*#+}} xmm4 = xmm4[2,0],xmm12[3,0]
+; SSE-NEXT: shufps {{.*#+}} xmm12 = xmm12[0,1],xmm4[0,2]
+; SSE-NEXT: pshufhw {{.*#+}} xmm4 = xmm12[0,1,2,3,4,6,6,7]
; SSE-NEXT: pshufd {{.*#+}} xmm4 = xmm4[0,2,2,3]
; SSE-NEXT: pshuflw {{.*#+}} xmm4 = xmm4[2,1,3,3,4,5,6,7]
; SSE-NEXT: pand %xmm5, %xmm4
; SSE-NEXT: por %xmm0, %xmm4
-; SSE-NEXT: shufps {{.*#+}} xmm4 = xmm4[0,1],xmm6[2,0]
-; SSE-NEXT: pshufd {{.*#+}} xmm8 = xmm8[1,1,1,1]
-; SSE-NEXT: pshufd $232, {{[-0-9]+}}(%r{{[sb]}}p), %xmm6 # 16-byte Folded Reload
-; SSE-NEXT: # xmm6 = mem[0,2,2,3]
-; SSE-NEXT: pshufd {{.*#+}} xmm0 = xmm7[0,1,1,3]
-; SSE-NEXT: pshuflw {{.*#+}} xmm6 = xmm6[0,1,0,3,4,5,6,7]
+; SSE-NEXT: shufps {{.*#+}} xmm4 = xmm4[0,1],xmm7[2,0]
+; SSE-NEXT: pshufd {{.*#+}} xmm8 = xmm11[1,1,1,1]
+; SSE-NEXT: pshufd {{.*#+}} xmm7 = xmm15[0,2,2,3]
+; SSE-NEXT: pshufd {{.*#+}} xmm0 = xmm6[0,1,1,3]
+; SSE-NEXT: pshuflw {{.*#+}} xmm7 = xmm7[0,1,0,3,4,5,6,7]
; SSE-NEXT: pshufhw {{.*#+}} xmm0 = xmm0[0,1,2,3,4,5,4,7]
-; SSE-NEXT: shufps {{.*#+}} xmm0 = xmm0[3,1],xmm6[1,3]
-; SSE-NEXT: punpckldq {{.*#+}} xmm6 = xmm6[0],xmm8[0],xmm6[1],xmm8[1]
-; SSE-NEXT: shufps {{.*#+}} xmm13 = xmm13[2,0],xmm2[3,0]
-; SSE-NEXT: shufps {{.*#+}} xmm2 = xmm2[0,1],xmm13[0,2]
-; SSE-NEXT: pshufhw {{.*#+}} xmm7 = xmm2[0,1,2,3,4,6,6,7]
-; SSE-NEXT: pshufd {{.*#+}} xmm7 = xmm7[0,2,2,3]
-; SSE-NEXT: pshuflw {{.*#+}} xmm7 = xmm7[2,1,3,3,4,5,6,7]
-; SSE-NEXT: pand %xmm5, %xmm7
-; SSE-NEXT: pandn %xmm6, %xmm5
-; SSE-NEXT: por %xmm7, %xmm5
+; SSE-NEXT: shufps {{.*#+}} xmm0 = xmm0[3,1],xmm7[1,3]
+; SSE-NEXT: punpckldq {{.*#+}} xmm7 = xmm7[0],xmm8[0],xmm7[1],xmm8[1]
+; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm6 # 16-byte Reload
+; SSE-NEXT: shufps {{.*#+}} xmm6 = xmm6[2,0],xmm14[3,0]
+; SSE-NEXT: shufps {{.*#+}} xmm14 = xmm14[0,1],xmm6[0,2]
+; SSE-NEXT: pshufhw {{.*#+}} xmm6 = xmm14[0,1,2,3,4,6,6,7]
+; SSE-NEXT: pshufd {{.*#+}} xmm6 = xmm6[0,2,2,3]
+; SSE-NEXT: pshuflw {{.*#+}} xmm6 = xmm6[2,1,3,3,4,5,6,7]
+; SSE-NEXT: pand %xmm5, %xmm6
+; SSE-NEXT: pandn %xmm7, %xmm5
+; SSE-NEXT: por %xmm6, %xmm5
; SSE-NEXT: shufps {{.*#+}} xmm5 = xmm5[0,1],xmm0[2,0]
-; SSE-NEXT: movaps (%rsp), %xmm0 # 16-byte Reload
-; SSE-NEXT: movaps %xmm0, 16(%rsi)
; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 16-byte Reload
+; SSE-NEXT: movaps %xmm0, 16(%rsi)
+; SSE-NEXT: movaps (%rsp), %xmm0 # 16-byte Reload
; SSE-NEXT: movaps %xmm0, (%rsi)
; SSE-NEXT: movdqa %xmm10, 16(%rdx)
; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 16-byte Reload
; SSE-NEXT: movaps %xmm0, (%rdx)
-; SSE-NEXT: movaps %xmm3, 16(%rcx)
-; SSE-NEXT: movaps %xmm14, (%rcx)
+; SSE-NEXT: movaps %xmm2, 16(%rcx)
+; SSE-NEXT: movaps %xmm13, (%rcx)
; SSE-NEXT: movaps %xmm1, 16(%r8)
-; SSE-NEXT: movaps %xmm12, (%r8)
+; SSE-NEXT: movaps %xmm3, (%r8)
; SSE-NEXT: movaps %xmm5, 16(%r9)
; SSE-NEXT: movaps %xmm4, (%r9)
-; SSE-NEXT: addq $40, %rsp
+; SSE-NEXT: addq $24, %rsp
; SSE-NEXT: retq
;
; AVX1-LABEL: vf16:
@@ -1339,76 +1333,76 @@ define void @vf32(<160 x i16>* %in.vec, <32 x i16>* %out.vec0, <32 x i16>* %out.
; SSE-LABEL: vf32:
; SSE: # %bb.0:
; SSE-NEXT: subq $344, %rsp # imm = 0x158
-; SSE-NEXT: movdqa 304(%rdi), %xmm9
-; SSE-NEXT: movdqa 240(%rdi), %xmm10
+; SSE-NEXT: movdqa 304(%rdi), %xmm15
+; SSE-NEXT: movdqa 240(%rdi), %xmm9
+; SSE-NEXT: movdqa 256(%rdi), %xmm12
+; SSE-NEXT: movdqa 288(%rdi), %xmm10
; SSE-NEXT: movdqa %xmm10, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
-; SSE-NEXT: movdqa 256(%rdi), %xmm11
-; SSE-NEXT: movdqa 288(%rdi), %xmm12
-; SSE-NEXT: movdqa 272(%rdi), %xmm7
-; SSE-NEXT: movdqa %xmm7, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
-; SSE-NEXT: movdqa 144(%rdi), %xmm4
+; SSE-NEXT: movdqa 272(%rdi), %xmm5
+; SSE-NEXT: movdqa %xmm5, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
+; SSE-NEXT: movdqa 144(%rdi), %xmm7
+; SSE-NEXT: movdqa 80(%rdi), %xmm11
+; SSE-NEXT: movdqa 96(%rdi), %xmm3
+; SSE-NEXT: movdqa 128(%rdi), %xmm4
; SSE-NEXT: movdqa %xmm4, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
-; SSE-NEXT: movdqa 80(%rdi), %xmm6
-; SSE-NEXT: movdqa 96(%rdi), %xmm8
-; SSE-NEXT: movdqa 128(%rdi), %xmm3
-; SSE-NEXT: movdqa %xmm3, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
-; SSE-NEXT: movdqa 112(%rdi), %xmm15
+; SSE-NEXT: movdqa 112(%rdi), %xmm2
+; SSE-NEXT: movdqa %xmm2, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
; SSE-NEXT: movdqa {{.*#+}} xmm0 = [65535,65535,65535,65535,0,65535,65535,65535]
; SSE-NEXT: movdqa %xmm0, %xmm1
-; SSE-NEXT: pandn %xmm15, %xmm1
-; SSE-NEXT: pshufd {{.*#+}} xmm2 = xmm3[0,1,0,3]
+; SSE-NEXT: pandn %xmm2, %xmm1
+; SSE-NEXT: pshufd {{.*#+}} xmm2 = xmm4[0,1,0,3]
; SSE-NEXT: pand %xmm0, %xmm2
; SSE-NEXT: por %xmm1, %xmm2
-; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm8[3,1,2,3]
+; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm3[3,1,2,3]
+; SSE-NEXT: movdqa %xmm3, %xmm14
+; SSE-NEXT: movdqa %xmm3, (%rsp) # 16-byte Spill
; SSE-NEXT: pshuflw {{.*#+}} xmm1 = xmm1[2,1,2,3,4,5,6,7]
-; SSE-NEXT: pshufd {{.*#+}} xmm3 = xmm6[0,2,2,3]
-; SSE-NEXT: movdqa %xmm6, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
+; SSE-NEXT: pshufd {{.*#+}} xmm3 = xmm11[0,2,2,3]
; SSE-NEXT: pshuflw {{.*#+}} xmm3 = xmm3[0,3,2,3,4,5,6,7]
; SSE-NEXT: punpckldq {{.*#+}} xmm3 = xmm3[0],xmm1[0],xmm3[1],xmm1[1]
; SSE-NEXT: shufps {{.*#+}} xmm3 = xmm3[0,1],xmm2[2,3]
; SSE-NEXT: movaps {{.*#+}} xmm13 = [65535,65535,65535,65535,65535,65535,65535,0]
; SSE-NEXT: andps %xmm13, %xmm3
-; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm4[0,1,0,1]
+; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm7[0,1,0,1]
; SSE-NEXT: movaps %xmm13, %xmm2
; SSE-NEXT: pandn %xmm1, %xmm2
; SSE-NEXT: por %xmm3, %xmm2
; SSE-NEXT: movdqa %xmm2, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
; SSE-NEXT: movdqa %xmm0, %xmm1
-; SSE-NEXT: pandn %xmm7, %xmm1
-; SSE-NEXT: pshufd {{.*#+}} xmm2 = xmm12[0,1,0,3]
-; SSE-NEXT: movdqa %xmm12, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
+; SSE-NEXT: pandn %xmm5, %xmm1
+; SSE-NEXT: pshufd {{.*#+}} xmm2 = xmm10[0,1,0,3]
; SSE-NEXT: pand %xmm0, %xmm2
; SSE-NEXT: por %xmm1, %xmm2
-; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm11[3,1,2,3]
-; SSE-NEXT: movdqa %xmm11, %xmm4
-; SSE-NEXT: movdqa %xmm11, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
+; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm12[3,1,2,3]
+; SSE-NEXT: movdqa %xmm12, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
; SSE-NEXT: pshuflw {{.*#+}} xmm1 = xmm1[2,1,2,3,4,5,6,7]
-; SSE-NEXT: pshufd {{.*#+}} xmm3 = xmm10[0,2,2,3]
+; SSE-NEXT: pshufd {{.*#+}} xmm3 = xmm9[0,2,2,3]
; SSE-NEXT: pshuflw {{.*#+}} xmm3 = xmm3[0,3,2,3,4,5,6,7]
; SSE-NEXT: punpckldq {{.*#+}} xmm3 = xmm3[0],xmm1[0],xmm3[1],xmm1[1]
; SSE-NEXT: shufps {{.*#+}} xmm3 = xmm3[0,1],xmm2[2,3]
-; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm9[0,1,0,1]
+; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm15[0,1,0,1]
+; SSE-NEXT: movdqa %xmm15, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
; SSE-NEXT: movaps %xmm13, %xmm2
; SSE-NEXT: andnps %xmm1, %xmm2
-; SSE-NEXT: movdqa 32(%rdi), %xmm5
-; SSE-NEXT: movdqa %xmm5, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
+; SSE-NEXT: movdqa 32(%rdi), %xmm4
+; SSE-NEXT: movdqa %xmm4, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
; SSE-NEXT: andps %xmm13, %xmm3
; SSE-NEXT: orps %xmm3, %xmm2
; SSE-NEXT: movaps %xmm2, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
; SSE-NEXT: movdqa %xmm0, %xmm1
-; SSE-NEXT: pandn %xmm5, %xmm1
+; SSE-NEXT: pandn %xmm4, %xmm1
; SSE-NEXT: movdqa 48(%rdi), %xmm2
; SSE-NEXT: movdqa %xmm2, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
; SSE-NEXT: pshufd {{.*#+}} xmm2 = xmm2[0,1,0,3]
; SSE-NEXT: pand %xmm0, %xmm2
; SSE-NEXT: por %xmm1, %xmm2
-; SSE-NEXT: movdqa 16(%rdi), %xmm3
-; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm3[3,1,2,3]
-; SSE-NEXT: movdqa %xmm3, %xmm14
-; SSE-NEXT: movdqa %xmm3, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
+; SSE-NEXT: movdqa 16(%rdi), %xmm6
+; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm6[3,1,2,3]
+; SSE-NEXT: movdqa %xmm6, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
; SSE-NEXT: pshuflw {{.*#+}} xmm1 = xmm1[2,1,2,3,4,5,6,7]
-; SSE-NEXT: movdqa (%rdi), %xmm5
-; SSE-NEXT: pshufd {{.*#+}} xmm3 = xmm5[0,2,2,3]
+; SSE-NEXT: movdqa (%rdi), %xmm4
+; SSE-NEXT: pshufd {{.*#+}} xmm3 = xmm4[0,2,2,3]
+; SSE-NEXT: movdqa %xmm4, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
; SSE-NEXT: pshuflw {{.*#+}} xmm3 = xmm3[0,3,2,3,4,5,6,7]
; SSE-NEXT: punpckldq {{.*#+}} xmm3 = xmm3[0],xmm1[0],xmm3[1],xmm1[1]
; SSE-NEXT: shufps {{.*#+}} xmm3 = xmm3[0,1],xmm2[2,3]
@@ -1428,13 +1422,14 @@ define void @vf32(<160 x i16>* %in.vec, <32 x i16>* %out.vec0, <32 x i16>* %out.
; SSE-NEXT: movdqa %xmm2, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
; SSE-NEXT: pandn %xmm2, %xmm0
; SSE-NEXT: por %xmm1, %xmm0
-; SSE-NEXT: movdqa 176(%rdi), %xmm11
-; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm11[3,1,2,3]
-; SSE-NEXT: movdqa %xmm11, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
+; SSE-NEXT: movdqa 176(%rdi), %xmm10
+; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm10[3,1,2,3]
+; SSE-NEXT: movdqa %xmm10, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
; SSE-NEXT: pshuflw {{.*#+}} xmm1 = xmm1[2,1,2,3,4,5,6,7]
-; SSE-NEXT: movdqa 160(%rdi), %xmm2
-; SSE-NEXT: movdqa %xmm2, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
-; SSE-NEXT: pshufd {{.*#+}} xmm2 = xmm2[0,2,2,3]
+; SSE-NEXT: movdqa 160(%rdi), %xmm3
+; SSE-NEXT: pshufd {{.*#+}} xmm2 = xmm3[0,2,2,3]
+; SSE-NEXT: movdqa %xmm3, %xmm8
+; SSE-NEXT: movdqa %xmm3, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
; SSE-NEXT: pshuflw {{.*#+}} xmm2 = xmm2[0,3,2,3,4,5,6,7]
; SSE-NEXT: punpckldq {{.*#+}} xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
; SSE-NEXT: shufps {{.*#+}} xmm2 = xmm2[0,1],xmm0[2,3]
@@ -1446,19 +1441,19 @@ define void @vf32(<160 x i16>* %in.vec, <32 x i16>* %out.vec0, <32 x i16>* %out.
; SSE-NEXT: andps %xmm13, %xmm2
; SSE-NEXT: orps %xmm2, %xmm1
; SSE-NEXT: movaps %xmm1, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
-; SSE-NEXT: movdqa %xmm8, %xmm10
-; SSE-NEXT: movdqa %xmm8, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
-; SSE-NEXT: movdqa %xmm8, %xmm0
+; SSE-NEXT: movdqa %xmm14, %xmm0
; SSE-NEXT: psrlq $48, %xmm0
-; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm6[0,3,2,3]
+; SSE-NEXT: movdqa %xmm11, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
+; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm11[0,3,2,3]
; SSE-NEXT: pshuflw {{.*#+}} xmm1 = xmm1[1,2,2,3,4,5,6,7]
; SSE-NEXT: punpckldq {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
; SSE-NEXT: movdqa {{.*#+}} xmm0 = [0,0,0,65535,65535,65535,65535,65535]
; SSE-NEXT: movdqa %xmm0, %xmm2
; SSE-NEXT: pandn %xmm1, %xmm2
-; SSE-NEXT: movdqa {{[-0-9]+}}(%r{{[sb]}}p), %xmm8 # 16-byte Reload
-; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm8[1,3,2,3]
-; SSE-NEXT: pshufd {{.*#+}} xmm3 = xmm15[0,2,2,3]
+; SSE-NEXT: movdqa {{[-0-9]+}}(%r{{[sb]}}p), %xmm14 # 16-byte Reload
+; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm14[1,3,2,3]
+; SSE-NEXT: pshufd $232, {{[-0-9]+}}(%r{{[sb]}}p), %xmm3 # 16-byte Folded Reload
+; SSE-NEXT: # xmm3 = mem[0,2,2,3]
; SSE-NEXT: punpckldq {{.*#+}} xmm3 = xmm3[0],xmm1[0],xmm3[1],xmm1[1]
; SSE-NEXT: pshufhw {{.*#+}} xmm1 = xmm3[0,1,2,3,7,5,6,7]
; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm1[0,1,2,1]
@@ -1466,7 +1461,7 @@ define void @vf32(<160 x i16>* %in.vec, <32 x i16>* %out.vec0, <32 x i16>* %out.
; SSE-NEXT: pshufhw {{.*#+}} xmm1 = xmm1[0,1,2,3,5,6,4,7]
; SSE-NEXT: pand %xmm0, %xmm1
; SSE-NEXT: por %xmm2, %xmm1
-; SSE-NEXT: movdqa {{[-0-9]+}}(%r{{[sb]}}p), %xmm7 # 16-byte Reload
+; SSE-NEXT: movdqa %xmm7, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
; SSE-NEXT: movdqa %xmm7, %xmm2
; SSE-NEXT: psllq $48, %xmm2
; SSE-NEXT: movaps %xmm13, %xmm3
@@ -1474,15 +1469,16 @@ define void @vf32(<160 x i16>* %in.vec, <32 x i16>* %out.vec0, <32 x i16>* %out.
; SSE-NEXT: pand %xmm13, %xmm1
; SSE-NEXT: orps %xmm1, %xmm3
; SSE-NEXT: movaps %xmm3, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
-; SSE-NEXT: movdqa %xmm4, %xmm1
-; SSE-NEXT: psrlq $48, %xmm1
-; SSE-NEXT: movdqa {{[-0-9]+}}(%r{{[sb]}}p), %xmm6 # 16-byte Reload
-; SSE-NEXT: pshufd {{.*#+}} xmm2 = xmm6[0,3,2,3]
+; SSE-NEXT: psrlq $48, %xmm12
+; SSE-NEXT: movdqa %xmm9, %xmm5
+; SSE-NEXT: movdqa %xmm9, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
+; SSE-NEXT: pshufd {{.*#+}} xmm2 = xmm9[0,3,2,3]
; SSE-NEXT: pshuflw {{.*#+}} xmm2 = xmm2[1,2,2,3,4,5,6,7]
-; SSE-NEXT: punpckldq {{.*#+}} xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
+; SSE-NEXT: punpckldq {{.*#+}} xmm2 = xmm2[0],xmm12[0],xmm2[1],xmm12[1]
; SSE-NEXT: movdqa %xmm0, %xmm1
; SSE-NEXT: pandn %xmm2, %xmm1
-; SSE-NEXT: pshufd {{.*#+}} xmm2 = xmm12[1,3,2,3]
+; SSE-NEXT: movdqa {{[-0-9]+}}(%r{{[sb]}}p), %xmm9 # 16-byte Reload
+; SSE-NEXT: pshufd {{.*#+}} xmm2 = xmm9[1,3,2,3]
; SSE-NEXT: pshufd $232, {{[-0-9]+}}(%r{{[sb]}}p), %xmm3 # 16-byte Folded Reload
; SSE-NEXT: # xmm3 = mem[0,2,2,3]
; SSE-NEXT: punpckldq {{.*#+}} xmm3 = xmm3[0],xmm2[0],xmm3[1],xmm2[1]
@@ -1492,24 +1488,20 @@ define void @vf32(<160 x i16>* %in.vec, <32 x i16>* %out.vec0, <32 x i16>* %out.
; SSE-NEXT: pshufhw {{.*#+}} xmm2 = xmm2[0,1,2,3,5,6,4,7]
; SSE-NEXT: pand %xmm0, %xmm2
; SSE-NEXT: por %xmm1, %xmm2
-; SSE-NEXT: movdqa %xmm9, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
-; SSE-NEXT: movdqa %xmm9, %xmm1
-; SSE-NEXT: psllq $48, %xmm1
+; SSE-NEXT: psllq $48, %xmm15
; SSE-NEXT: movdqa %xmm13, %xmm3
-; SSE-NEXT: pandn %xmm1, %xmm3
+; SSE-NEXT: pandn %xmm15, %xmm3
; SSE-NEXT: pand %xmm13, %xmm2
; SSE-NEXT: por %xmm2, %xmm3
; SSE-NEXT: movdqa %xmm3, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
-; SSE-NEXT: movdqa %xmm14, %xmm1
-; SSE-NEXT: psrlq $48, %xmm1
-; SSE-NEXT: movdqa %xmm5, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
-; SSE-NEXT: pshufd {{.*#+}} xmm2 = xmm5[0,3,2,3]
+; SSE-NEXT: psrlq $48, %xmm6
+; SSE-NEXT: pshufd {{.*#+}} xmm2 = xmm4[0,3,2,3]
; SSE-NEXT: pshuflw {{.*#+}} xmm2 = xmm2[1,2,2,3,4,5,6,7]
-; SSE-NEXT: punpckldq {{.*#+}} xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
+; SSE-NEXT: punpckldq {{.*#+}} xmm2 = xmm2[0],xmm6[0],xmm2[1],xmm6[1]
; SSE-NEXT: movdqa %xmm0, %xmm1
; SSE-NEXT: pandn %xmm2, %xmm1
-; SSE-NEXT: movdqa {{[-0-9]+}}(%r{{[sb]}}p), %xmm14 # 16-byte Reload
-; SSE-NEXT: pshufd {{.*#+}} xmm2 = xmm14[1,3,2,3]
+; SSE-NEXT: movdqa {{[-0-9]+}}(%r{{[sb]}}p), %xmm15 # 16-byte Reload
+; SSE-NEXT: pshufd {{.*#+}} xmm2 = xmm15[1,3,2,3]
; SSE-NEXT: pshufd $232, {{[-0-9]+}}(%r{{[sb]}}p), %xmm3 # 16-byte Folded Reload
; SSE-NEXT: # xmm3 = mem[0,2,2,3]
; SSE-NEXT: punpckldq {{.*#+}} xmm3 = xmm3[0],xmm2[0],xmm3[1],xmm2[1]
@@ -1526,13 +1518,12 @@ define void @vf32(<160 x i16>* %in.vec, <32 x i16>* %out.vec0, <32 x i16>* %out.
; SSE-NEXT: pand %xmm13, %xmm2
; SSE-NEXT: por %xmm2, %xmm3
; SSE-NEXT: movdqa %xmm3, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
-; SSE-NEXT: psrlq $48, %xmm11
-; SSE-NEXT: movdqa {{[-0-9]+}}(%r{{[sb]}}p), %xmm4 # 16-byte Reload
-; SSE-NEXT: pshufd {{.*#+}} xmm2 = xmm4[0,3,2,3]
+; SSE-NEXT: psrlq $48, %xmm10
+; SSE-NEXT: pshufd {{.*#+}} xmm2 = xmm8[0,3,2,3]
; SSE-NEXT: pshuflw {{.*#+}} xmm2 = xmm2[1,2,2,3,4,5,6,7]
-; SSE-NEXT: punpckldq {{.*#+}} xmm2 = xmm2[0],xmm11[0],xmm2[1],xmm11[1]
-; SSE-NEXT: movdqa {{[-0-9]+}}(%r{{[sb]}}p), %xmm12 # 16-byte Reload
-; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm12[1,3,2,3]
+; SSE-NEXT: punpckldq {{.*#+}} xmm2 = xmm2[0],xmm10[0],xmm2[1],xmm10[1]
+; SSE-NEXT: movdqa {{[-0-9]+}}(%r{{[sb]}}p), %xmm8 # 16-byte Reload
+; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm8[1,3,2,3]
; SSE-NEXT: pshufd $232, {{[-0-9]+}}(%r{{[sb]}}p), %xmm3 # 16-byte Folded Reload
; SSE-NEXT: # xmm3 = mem[0,2,2,3]
; SSE-NEXT: punpckldq {{.*#+}} xmm3 = xmm3[0],xmm1[0],xmm3[1],xmm1[1]
@@ -1544,290 +1535,296 @@ define void @vf32(<160 x i16>* %in.vec, <32 x i16>* %out.vec0, <32 x i16>* %out.
; SSE-NEXT: pandn %xmm2, %xmm0
; SSE-NEXT: por %xmm1, %xmm0
; SSE-NEXT: pand %xmm13, %xmm0
-; SSE-NEXT: movdqa {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Reload
+; SSE-NEXT: movdqa {{[-0-9]+}}(%r{{[sb]}}p), %xmm4 # 16-byte Reload
+; SSE-NEXT: movdqa %xmm4, %xmm1
; SSE-NEXT: psllq $48, %xmm1
; SSE-NEXT: pandn %xmm1, %xmm13
; SSE-NEXT: por %xmm0, %xmm13
-; SSE-NEXT: movdqa {{[-0-9]+}}(%r{{[sb]}}p), %xmm3 # 16-byte Reload
-; SSE-NEXT: pshufd {{.*#+}} xmm0 = xmm3[0,1,1,3]
-; SSE-NEXT: pshufhw {{.*#+}} xmm1 = xmm0[0,1,2,3,4,7,6,7]
-; SSE-NEXT: punpckhdq {{.*#+}} xmm1 = xmm1[2],xmm10[2],xmm1[3],xmm10[3]
-; SSE-NEXT: movdqa {{.*#+}} xmm11 = [65535,65535,65535,0,0,0,65535,65535]
-; SSE-NEXT: pand %xmm11, %xmm1
-; SSE-NEXT: movdqa %xmm15, (%rsp) # 16-byte Spill
-; SSE-NEXT: shufps {{.*#+}} xmm8 = xmm8[1,0],xmm15[0,0]
-; SSE-NEXT: shufps {{.*#+}} xmm8 = xmm8[2,0],xmm15[2,3]
-; SSE-NEXT: shufps {{.*#+}} xmm8 = xmm8[0,1,1,3]
-; SSE-NEXT: pshuflw {{.*#+}} xmm2 = xmm8[1,1,1,1,4,5,6,7]
-; SSE-NEXT: pshufhw {{.*#+}} xmm2 = xmm2[0,1,2,3,6,5,6,7]
-; SSE-NEXT: movdqa %xmm11, %xmm0
-; SSE-NEXT: pandn %xmm2, %xmm0
-; SSE-NEXT: por %xmm1, %xmm0
-; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm7[0,1,2,0]
-; SSE-NEXT: pshufhw {{.*#+}} xmm1 = xmm1[0,1,2,3,4,5,6,5]
-; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[3,1],xmm2[2,3]
-; SSE-NEXT: shufps {{.*#+}} xmm0 = xmm0[0,1],xmm1[2,0]
+; SSE-NEXT: movdqa {{[-0-9]+}}(%r{{[sb]}}p), %xmm10 # 16-byte Reload
+; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm10[0,0,2,3]
+; SSE-NEXT: movdqa {{.*#+}} xmm6 = [65535,65535,65535,0,0,0,65535,65535]
+; SSE-NEXT: movdqa %xmm6, %xmm2
+; SSE-NEXT: pandn %xmm1, %xmm2
+; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm11[0,1,1,3]
+; SSE-NEXT: pshufhw {{.*#+}} xmm0 = xmm1[0,1,2,3,4,7,6,7]
+; SSE-NEXT: punpckhdq (%rsp), %xmm0 # 16-byte Folded Reload
+; SSE-NEXT: # xmm0 = xmm0[2],mem[2],xmm0[3],mem[3]
+; SSE-NEXT: pand %xmm6, %xmm0
+; SSE-NEXT: por %xmm2, %xmm0
+; SSE-NEXT: movdqa %xmm14, %xmm1
+; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[1,0],xmm10[0,0]
+; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[2,0],xmm10[2,3]
+; SSE-NEXT: movdqa %xmm10, %xmm14
+; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[0,1,1,3]
+; SSE-NEXT: pshufhw {{.*#+}} xmm1 = xmm1[0,1,2,3,6,5,6,7]
+; SSE-NEXT: pshufd {{.*#+}} xmm2 = xmm7[0,1,2,0]
+; SSE-NEXT: pshufhw {{.*#+}} xmm2 = xmm2[0,1,2,3,4,5,6,5]
+; SSE-NEXT: shufps {{.*#+}} xmm2 = xmm2[3,1],xmm1[2,3]
+; SSE-NEXT: shufps {{.*#+}} xmm0 = xmm0[0,1],xmm2[2,0]
; SSE-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
-; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm6[0,1,1,3]
-; SSE-NEXT: pshufhw {{.*#+}} xmm1 = xmm1[0,1,2,3,4,7,6,7]
-; SSE-NEXT: movdqa {{[-0-9]+}}(%r{{[sb]}}p), %xmm7 # 16-byte Reload
-; SSE-NEXT: punpckhdq {{.*#+}} xmm1 = xmm1[2],xmm7[2],xmm1[3],xmm7[3]
-; SSE-NEXT: pand %xmm11, %xmm1
-; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 16-byte Reload
-; SSE-NEXT: movaps %xmm0, %xmm2
-; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm6 # 16-byte Reload
-; SSE-NEXT: shufps {{.*#+}} xmm2 = xmm2[1,0],xmm6[0,0]
-; SSE-NEXT: shufps {{.*#+}} xmm2 = xmm2[2,0],xmm6[2,3]
-; SSE-NEXT: shufps {{.*#+}} xmm2 = xmm2[0,1,1,3]
-; SSE-NEXT: pshuflw {{.*#+}} xmm2 = xmm2[1,1,1,1,4,5,6,7]
-; SSE-NEXT: pshufhw {{.*#+}} xmm2 = xmm2[0,1,2,3,6,5,6,7]
-; SSE-NEXT: movdqa %xmm11, %xmm6
-; SSE-NEXT: pandn %xmm2, %xmm6
-; SSE-NEXT: por %xmm1, %xmm6
-; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm9[0,1,2,0]
-; SSE-NEXT: pshufhw {{.*#+}} xmm1 = xmm1[0,1,2,3,4,5,6,5]
-; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[3,1],xmm2[2,3]
-; SSE-NEXT: shufps {{.*#+}} xmm6 = xmm6[0,1],xmm1[2,0]
-; SSE-NEXT: movaps %xmm6, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
+; SSE-NEXT: movdqa {{[-0-9]+}}(%r{{[sb]}}p), %xmm10 # 16-byte Reload
+; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm10[0,0,2,3]
+; SSE-NEXT: movdqa %xmm6, %xmm2
+; SSE-NEXT: pandn %xmm1, %xmm2
; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm5[0,1,1,3]
; SSE-NEXT: pshufhw {{.*#+}} xmm1 = xmm1[0,1,2,3,4,7,6,7]
-; SSE-NEXT: movdqa {{[-0-9]+}}(%r{{[sb]}}p), %xmm8 # 16-byte Reload
-; SSE-NEXT: punpckhdq {{.*#+}} xmm1 = xmm1[2],xmm8[2],xmm1[3],xmm8[3]
-; SSE-NEXT: pand %xmm11, %xmm1
-; SSE-NEXT: movdqa %xmm14, %xmm2
-; SSE-NEXT: movdqa %xmm14, %xmm10
-; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm5 # 16-byte Reload
-; SSE-NEXT: shufps {{.*#+}} xmm2 = xmm2[1,0],xmm5[0,0]
-; SSE-NEXT: shufps {{.*#+}} xmm2 = xmm2[2,0],xmm5[2,3]
-; SSE-NEXT: shufps {{.*#+}} xmm2 = xmm2[0,1,1,3]
-; SSE-NEXT: pshuflw {{.*#+}} xmm2 = xmm2[1,1,1,1,4,5,6,7]
-; SSE-NEXT: pshufhw {{.*#+}} xmm2 = xmm2[0,1,2,3,6,5,6,7]
-; SSE-NEXT: movdqa %xmm11, %xmm14
-; SSE-NEXT: pandn %xmm2, %xmm14
-; SSE-NEXT: por %xmm1, %xmm14
; SSE-NEXT: movdqa {{[-0-9]+}}(%r{{[sb]}}p), %xmm5 # 16-byte Reload
-; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm5[0,1,2,0]
-; SSE-NEXT: pshufhw {{.*#+}} xmm1 = xmm1[0,1,2,3,4,5,6,5]
-; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[3,1],xmm2[2,3]
-; SSE-NEXT: shufps {{.*#+}} xmm14 = xmm14[0,1],xmm1[2,0]
-; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm4[0,1,1,3]
-; SSE-NEXT: pshufhw {{.*#+}} xmm1 = xmm1[0,1,2,3,4,7,6,7]
+; SSE-NEXT: punpckhdq {{.*#+}} xmm1 = xmm1[2],xmm5[2],xmm1[3],xmm5[3]
+; SSE-NEXT: pand %xmm6, %xmm1
+; SSE-NEXT: por %xmm2, %xmm1
+; SSE-NEXT: movdqa %xmm1, %xmm3
+; SSE-NEXT: shufps {{.*#+}} xmm9 = xmm9[1,0],xmm10[0,0]
+; SSE-NEXT: shufps {{.*#+}} xmm9 = xmm9[2,0],xmm10[2,3]
+; SSE-NEXT: shufps {{.*#+}} xmm9 = xmm9[0,1,1,3]
+; SSE-NEXT: pshufhw {{.*#+}} xmm1 = xmm9[0,1,2,3,6,5,6,7]
+; SSE-NEXT: movdqa {{[-0-9]+}}(%r{{[sb]}}p), %xmm10 # 16-byte Reload
+; SSE-NEXT: pshufd {{.*#+}} xmm2 = xmm10[0,1,2,0]
+; SSE-NEXT: pshufhw {{.*#+}} xmm2 = xmm2[0,1,2,3,4,5,6,5]
+; SSE-NEXT: shufps {{.*#+}} xmm2 = xmm2[3,1],xmm1[2,3]
+; SSE-NEXT: shufps {{.*#+}} xmm3 = xmm3[0,1],xmm2[2,0]
+; SSE-NEXT: movaps %xmm3, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
+; SSE-NEXT: movdqa {{[-0-9]+}}(%r{{[sb]}}p), %xmm7 # 16-byte Reload
+; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm7[0,0,2,3]
+; SSE-NEXT: movdqa %xmm6, %xmm2
+; SSE-NEXT: pandn %xmm1, %xmm2
; SSE-NEXT: movdqa {{[-0-9]+}}(%r{{[sb]}}p), %xmm9 # 16-byte Reload
-; SSE-NEXT: punpckhdq {{.*#+}} xmm1 = xmm1[2],xmm9[2],xmm1[3],xmm9[3]
-; SSE-NEXT: pand %xmm11, %xmm1
-; SSE-NEXT: movdqa %xmm12, %xmm2
-; SSE-NEXT: movdqa %xmm12, %xmm15
-; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm4 # 16-byte Reload
-; SSE-NEXT: shufps {{.*#+}} xmm2 = xmm2[1,0],xmm4[0,0]
-; SSE-NEXT: shufps {{.*#+}} xmm2 = xmm2[2,0],xmm4[2,3]
-; SSE-NEXT: shufps {{.*#+}} xmm2 = xmm2[0,1,1,3]
-; SSE-NEXT: pshuflw {{.*#+}} xmm2 = xmm2[1,1,1,1,4,5,6,7]
-; SSE-NEXT: pshufhw {{.*#+}} xmm2 = xmm2[0,1,2,3,6,5,6,7]
-; SSE-NEXT: movdqa %xmm11, %xmm12
-; SSE-NEXT: pandn %xmm2, %xmm12
-; SSE-NEXT: por %xmm1, %xmm12
-; SSE-NEXT: movdqa {{[-0-9]+}}(%r{{[sb]}}p), %xmm6 # 16-byte Reload
-; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm6[0,1,2,0]
-; SSE-NEXT: pshufhw {{.*#+}} xmm1 = xmm1[0,1,2,3,4,5,6,5]
-; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[3,1],xmm2[2,3]
-; SSE-NEXT: shufps {{.*#+}} xmm12 = xmm12[0,1],xmm1[2,0]
-; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Reload
-; SSE-NEXT: movaps (%rsp), %xmm2 # 16-byte Reload
-; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[2,0],xmm2[3,0]
-; SSE-NEXT: shufps {{.*#+}} xmm2 = xmm2[0,1],xmm1[0,2]
-; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm3[1,1,1,1]
-; SSE-NEXT: pshufd $232, {{[-0-9]+}}(%r{{[sb]}}p), %xmm3 # 16-byte Folded Reload
-; SSE-NEXT: # xmm3 = mem[0,2,2,3]
-; SSE-NEXT: punpckldq {{.*#+}} xmm3 = xmm3[0],xmm1[0],xmm3[1],xmm1[1]
-; SSE-NEXT: pshuflw {{.*#+}} xmm1 = xmm2[2,2,2,2,4,5,6,7]
-; SSE-NEXT: pshufhw {{.*#+}} xmm1 = xmm1[0,1,2,3,7,4,6,7]
-; SSE-NEXT: movdqa %xmm11, %xmm2
+; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm9[0,1,1,3]
+; SSE-NEXT: pshufhw {{.*#+}} xmm11 = xmm1[0,1,2,3,4,7,6,7]
+; SSE-NEXT: movdqa {{[-0-9]+}}(%r{{[sb]}}p), %xmm3 # 16-byte Reload
+; SSE-NEXT: punpckhdq {{.*#+}} xmm11 = xmm11[2],xmm3[2],xmm11[3],xmm3[3]
+; SSE-NEXT: pand %xmm6, %xmm11
+; SSE-NEXT: por %xmm2, %xmm11
+; SSE-NEXT: movdqa %xmm15, %xmm1
+; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[1,0],xmm7[0,0]
+; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[2,0],xmm7[2,3]
+; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[0,1,1,3]
+; SSE-NEXT: pshufhw {{.*#+}} xmm1 = xmm1[0,1,2,3,6,5,6,7]
+; SSE-NEXT: movdqa {{[-0-9]+}}(%r{{[sb]}}p), %xmm12 # 16-byte Reload
+; SSE-NEXT: pshufd {{.*#+}} xmm2 = xmm12[0,1,2,0]
+; SSE-NEXT: pshufhw {{.*#+}} xmm2 = xmm2[0,1,2,3,4,5,6,5]
+; SSE-NEXT: shufps {{.*#+}} xmm2 = xmm2[3,1],xmm1[2,3]
+; SSE-NEXT: shufps {{.*#+}} xmm11 = xmm11[0,1],xmm2[2,0]
+; SSE-NEXT: movdqa {{[-0-9]+}}(%r{{[sb]}}p), %xmm15 # 16-byte Reload
+; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm15[0,0,2,3]
+; SSE-NEXT: movdqa %xmm6, %xmm2
; SSE-NEXT: pandn %xmm1, %xmm2
-; SSE-NEXT: pshuflw {{.*#+}} xmm3 = xmm3[0,3,2,3,4,5,6,7]
-; SSE-NEXT: pshufd {{.*#+}} xmm3 = xmm3[0,2,2,3]
-; SSE-NEXT: pshuflw {{.*#+}} xmm4 = xmm3[1,0,3,3,4,5,6,7]
-; SSE-NEXT: pand %xmm11, %xmm4
-; SSE-NEXT: por %xmm2, %xmm4
-; SSE-NEXT: pshufd $196, {{[-0-9]+}}(%r{{[sb]}}p), %xmm2 # 16-byte Folded Reload
-; SSE-NEXT: # xmm2 = mem[0,1,0,3]
-; SSE-NEXT: pshufhw {{.*#+}} xmm2 = xmm2[0,1,2,3,4,5,5,6]
+; SSE-NEXT: pshufd $212, {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
+; SSE-NEXT: # xmm1 = mem[0,1,1,3]
+; SSE-NEXT: pshufhw {{.*#+}} xmm7 = xmm1[0,1,2,3,4,7,6,7]
+; SSE-NEXT: punpckhdq {{[-0-9]+}}(%r{{[sb]}}p), %xmm7 # 16-byte Folded Reload
+; SSE-NEXT: # xmm7 = xmm7[2],mem[2],xmm7[3],mem[3]
+; SSE-NEXT: pand %xmm6, %xmm7
+; SSE-NEXT: por %xmm2, %xmm7
+; SSE-NEXT: shufps {{.*#+}} xmm8 = xmm8[1,0],xmm15[0,0]
+; SSE-NEXT: shufps {{.*#+}} xmm8 = xmm8[2,0],xmm15[2,3]
+; SSE-NEXT: shufps {{.*#+}} xmm8 = xmm8[0,1,1,3]
+; SSE-NEXT: pshufhw {{.*#+}} xmm1 = xmm8[0,1,2,3,6,5,6,7]
+; SSE-NEXT: pshufd {{.*#+}} xmm2 = xmm4[0,1,2,0]
+; SSE-NEXT: pshufhw {{.*#+}} xmm2 = xmm2[0,1,2,3,4,5,6,5]
; SSE-NEXT: shufps {{.*#+}} xmm2 = xmm2[3,1],xmm1[2,3]
-; SSE-NEXT: shufps {{.*#+}} xmm4 = xmm4[0,1],xmm2[2,0]
-; SSE-NEXT: movaps %xmm0, %xmm1
-; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm2 # 16-byte Reload
-; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[2,0],xmm2[3,0]
-; SSE-NEXT: shufps {{.*#+}} xmm2 = xmm2[0,1],xmm1[0,2]
+; SSE-NEXT: shufps {{.*#+}} xmm7 = xmm7[0,1],xmm2[2,0]
+; SSE-NEXT: movdqa %xmm14, %xmm0
+; SSE-NEXT: pshuflw {{.*#+}} xmm1 = xmm14[2,2,2,2,4,5,6,7]
+; SSE-NEXT: movdqa %xmm6, %xmm2
+; SSE-NEXT: pandn %xmm1, %xmm2
; SSE-NEXT: pshufd $85, {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
; SSE-NEXT: # xmm1 = mem[1,1,1,1]
-; SSE-NEXT: pshufd {{.*#+}} xmm3 = xmm7[0,2,2,3]
-; SSE-NEXT: punpckldq {{.*#+}} xmm3 = xmm3[0],xmm1[0],xmm3[1],xmm1[1]
-; SSE-NEXT: pshuflw {{.*#+}} xmm1 = xmm2[2,2,2,2,4,5,6,7]
-; SSE-NEXT: pshufhw {{.*#+}} xmm1 = xmm1[0,1,2,3,7,4,6,7]
-; SSE-NEXT: movdqa %xmm11, %xmm2
-; SSE-NEXT: pandn %xmm1, %xmm2
-; SSE-NEXT: pshuflw {{.*#+}} xmm3 = xmm3[0,3,2,3,4,5,6,7]
-; SSE-NEXT: pshufd {{.*#+}} xmm3 = xmm3[0,2,2,3]
-; SSE-NEXT: pshuflw {{.*#+}} xmm3 = xmm3[1,0,3,3,4,5,6,7]
-; SSE-NEXT: pand %xmm11, %xmm3
-; SSE-NEXT: por %xmm2, %xmm3
+; SSE-NEXT: pshufd $232, (%rsp), %xmm4 # 16-byte Folded Reload
+; SSE-NEXT: # xmm4 = mem[0,2,2,3]
+; SSE-NEXT: punpckldq {{.*#+}} xmm4 = xmm4[0],xmm1[0],xmm4[1],xmm1[1]
+; SSE-NEXT: pshuflw {{.*#+}} xmm1 = xmm4[0,3,2,3,4,5,6,7]
+; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm1[0,2,2,3]
+; SSE-NEXT: pshuflw {{.*#+}} xmm14 = xmm1[1,0,3,3,4,5,6,7]
+; SSE-NEXT: pand %xmm6, %xmm14
+; SSE-NEXT: por %xmm2, %xmm14
+; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Reload
+; SSE-NEXT: movdqa %xmm0, %xmm2
+; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[2,0],xmm0[3,0]
+; SSE-NEXT: shufps {{.*#+}} xmm2 = xmm2[0,1],xmm1[0,2]
+; SSE-NEXT: pshufhw {{.*#+}} xmm1 = xmm2[0,1,2,3,7,4,6,7]
; SSE-NEXT: pshufd $196, {{[-0-9]+}}(%r{{[sb]}}p), %xmm2 # 16-byte Folded Reload
; SSE-NEXT: # xmm2 = mem[0,1,0,3]
; SSE-NEXT: pshufhw {{.*#+}} xmm2 = xmm2[0,1,2,3,4,5,5,6]
; SSE-NEXT: shufps {{.*#+}} xmm2 = xmm2[3,1],xmm1[2,3]
-; SSE-NEXT: shufps {{.*#+}} xmm3 = xmm3[0,1],xmm2[2,0]
-; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm2 # 16-byte Reload
-; SSE-NEXT: shufps {{.*#+}} xmm10 = xmm10[2,0],xmm2[3,0]
-; SSE-NEXT: shufps {{.*#+}} xmm2 = xmm2[0,1],xmm10[0,2]
+; SSE-NEXT: shufps {{.*#+}} xmm14 = xmm14[0,1],xmm2[2,0]
+; SSE-NEXT: movdqa {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 16-byte Reload
+; SSE-NEXT: pshuflw {{.*#+}} xmm1 = xmm0[2,2,2,2,4,5,6,7]
+; SSE-NEXT: movdqa %xmm6, %xmm2
+; SSE-NEXT: pandn %xmm1, %xmm2
; SSE-NEXT: pshufd $85, {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
; SSE-NEXT: # xmm1 = mem[1,1,1,1]
-; SSE-NEXT: pshufd {{.*#+}} xmm0 = xmm8[0,2,2,3]
-; SSE-NEXT: punpckldq {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
-; SSE-NEXT: pshuflw {{.*#+}} xmm1 = xmm2[2,2,2,2,4,5,6,7]
-; SSE-NEXT: pshufhw {{.*#+}} xmm1 = xmm1[0,1,2,3,7,4,6,7]
-; SSE-NEXT: movdqa %xmm11, %xmm8
-; SSE-NEXT: pandn %xmm1, %xmm8
-; SSE-NEXT: pshuflw {{.*#+}} xmm0 = xmm0[0,3,2,3,4,5,6,7]
-; SSE-NEXT: pshufd {{.*#+}} xmm0 = xmm0[0,2,2,3]
-; SSE-NEXT: pshuflw {{.*#+}} xmm2 = xmm0[1,0,3,3,4,5,6,7]
-; SSE-NEXT: pand %xmm11, %xmm2
-; SSE-NEXT: por %xmm8, %xmm2
-; SSE-NEXT: pshufd {{.*#+}} xmm0 = xmm5[0,1,0,3]
-; SSE-NEXT: pshufhw {{.*#+}} xmm0 = xmm0[0,1,2,3,4,5,5,6]
-; SSE-NEXT: shufps {{.*#+}} xmm0 = xmm0[3,1],xmm1[2,3]
-; SSE-NEXT: shufps {{.*#+}} xmm2 = xmm2[0,1],xmm0[2,0]
+; SSE-NEXT: pshufd {{.*#+}} xmm4 = xmm5[0,2,2,3]
+; SSE-NEXT: punpckldq {{.*#+}} xmm4 = xmm4[0],xmm1[0],xmm4[1],xmm1[1]
+; SSE-NEXT: pshuflw {{.*#+}} xmm1 = xmm4[0,3,2,3,4,5,6,7]
+; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm1[0,2,2,3]
+; SSE-NEXT: pshuflw {{.*#+}} xmm8 = xmm1[1,0,3,3,4,5,6,7]
+; SSE-NEXT: pand %xmm6, %xmm8
+; SSE-NEXT: por %xmm2, %xmm8
; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Reload
-; SSE-NEXT: shufps {{.*#+}} xmm15 = xmm15[2,0],xmm1[3,0]
-; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[0,1],xmm15[0,2]
-; SSE-NEXT: pshufd $85, {{[-0-9]+}}(%r{{[sb]}}p), %xmm8 # 16-byte Folded Reload
-; SSE-NEXT: # xmm8 = mem[1,1,1,1]
-; SSE-NEXT: pshufd {{.*#+}} xmm0 = xmm9[0,2,2,3]
-; SSE-NEXT: punpckldq {{.*#+}} xmm0 = xmm0[0],xmm8[0],xmm0[1],xmm8[1]
-; SSE-NEXT: pshuflw {{.*#+}} xmm1 = xmm1[2,2,2,2,4,5,6,7]
-; SSE-NEXT: pshufhw {{.*#+}} xmm8 = xmm1[0,1,2,3,7,4,6,7]
-; SSE-NEXT: movdqa %xmm11, %xmm1
-; SSE-NEXT: pandn %xmm8, %xmm1
-; SSE-NEXT: pshuflw {{.*#+}} xmm0 = xmm0[0,3,2,3,4,5,6,7]
-; SSE-NEXT: pshufd {{.*#+}} xmm0 = xmm0[0,2,2,3]
-; SSE-NEXT: pshuflw {{.*#+}} xmm0 = xmm0[1,0,3,3,4,5,6,7]
-; SSE-NEXT: pand %xmm11, %xmm0
-; SSE-NEXT: por %xmm1, %xmm0
-; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm6[0,1,0,3]
+; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[2,0],xmm0[3,0]
+; SSE-NEXT: shufps {{.*#+}} xmm0 = xmm0[0,1],xmm1[0,2]
+; SSE-NEXT: pshufhw {{.*#+}} xmm1 = xmm0[0,1,2,3,7,4,6,7]
+; SSE-NEXT: pshufd {{.*#+}} xmm2 = xmm10[0,1,0,3]
+; SSE-NEXT: pshufhw {{.*#+}} xmm2 = xmm2[0,1,2,3,4,5,5,6]
+; SSE-NEXT: shufps {{.*#+}} xmm2 = xmm2[3,1],xmm1[2,3]
+; SSE-NEXT: shufps {{.*#+}} xmm8 = xmm8[0,1],xmm2[2,0]
+; SSE-NEXT: movdqa {{[-0-9]+}}(%r{{[sb]}}p), %xmm4 # 16-byte Reload
+; SSE-NEXT: pshuflw {{.*#+}} xmm1 = xmm4[2,2,2,2,4,5,6,7]
+; SSE-NEXT: movdqa %xmm6, %xmm0
+; SSE-NEXT: pandn %xmm1, %xmm0
+; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm9[1,1,1,1]
+; SSE-NEXT: pshufd {{.*#+}} xmm2 = xmm3[0,2,2,3]
+; SSE-NEXT: punpckldq {{.*#+}} xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
+; SSE-NEXT: pshuflw {{.*#+}} xmm1 = xmm2[0,3,2,3,4,5,6,7]
+; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm1[0,2,2,3]
+; SSE-NEXT: pshuflw {{.*#+}} xmm2 = xmm1[1,0,3,3,4,5,6,7]
+; SSE-NEXT: pand %xmm6, %xmm2
+; SSE-NEXT: por %xmm0, %xmm2
+; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 16-byte Reload
+; SSE-NEXT: shufps {{.*#+}} xmm0 = xmm0[2,0],xmm4[3,0]
+; SSE-NEXT: movaps %xmm4, %xmm1
+; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[0,1],xmm0[0,2]
+; SSE-NEXT: pshufhw {{.*#+}} xmm0 = xmm1[0,1,2,3,7,4,6,7]
+; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm12[0,1,0,3]
; SSE-NEXT: pshufhw {{.*#+}} xmm1 = xmm1[0,1,2,3,4,5,5,6]
-; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[3,1],xmm8[2,3]
-; SSE-NEXT: shufps {{.*#+}} xmm0 = xmm0[0,1],xmm1[2,0]
-; SSE-NEXT: pshufd $85, (%rsp), %xmm8 # 16-byte Folded Reload
-; SSE-NEXT: # xmm8 = mem[1,1,1,1]
-; SSE-NEXT: pshufd $232, {{[-0-9]+}}(%r{{[sb]}}p), %xmm15 # 16-byte Folded Reload
-; SSE-NEXT: # xmm15 = mem[0,2,2,3]
-; SSE-NEXT: pshufd $212, {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
-; SSE-NEXT: # xmm1 = mem[0,1,1,3]
-; SSE-NEXT: pshuflw {{.*#+}} xmm15 = xmm15[0,1,0,3,4,5,6,7]
-; SSE-NEXT: pshufhw {{.*#+}} xmm1 = xmm1[0,1,2,3,4,5,4,7]
-; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[3,1],xmm15[1,3]
-; SSE-NEXT: punpckldq {{.*#+}} xmm15 = xmm15[0],xmm8[0],xmm15[1],xmm8[1]
-; SSE-NEXT: movdqa %xmm11, %xmm8
-; SSE-NEXT: pandn %xmm15, %xmm8
-; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm7 # 16-byte Reload
-; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm5 # 16-byte Reload
-; SSE-NEXT: shufps {{.*#+}} xmm7 = xmm7[2,0],xmm5[3,0]
-; SSE-NEXT: shufps {{.*#+}} xmm5 = xmm5[0,1],xmm7[0,2]
-; SSE-NEXT: pshufhw {{.*#+}} xmm7 = xmm5[0,1,2,3,4,6,6,7]
-; SSE-NEXT: pshufd {{.*#+}} xmm7 = xmm7[0,2,2,3]
-; SSE-NEXT: pshuflw {{.*#+}} xmm10 = xmm7[2,1,3,3,4,5,6,7]
-; SSE-NEXT: pand %xmm11, %xmm10
-; SSE-NEXT: por %xmm8, %xmm10
-; SSE-NEXT: shufps {{.*#+}} xmm10 = xmm10[0,1],xmm1[2,0]
-; SSE-NEXT: pshufd $85, {{[-0-9]+}}(%r{{[sb]}}p), %xmm8 # 16-byte Folded Reload
-; SSE-NEXT: # xmm8 = mem[1,1,1,1]
-; SSE-NEXT: pshufd $232, {{[-0-9]+}}(%r{{[sb]}}p), %xmm7 # 16-byte Folded Reload
-; SSE-NEXT: # xmm7 = mem[0,2,2,3]
-; SSE-NEXT: pshufd $212, {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
-; SSE-NEXT: # xmm1 = mem[0,1,1,3]
-; SSE-NEXT: pshuflw {{.*#+}} xmm7 = xmm7[0,1,0,3,4,5,6,7]
-; SSE-NEXT: pshufhw {{.*#+}} xmm1 = xmm1[0,1,2,3,4,5,4,7]
-; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[3,1],xmm7[1,3]
-; SSE-NEXT: punpckldq {{.*#+}} xmm7 = xmm7[0],xmm8[0],xmm7[1],xmm8[1]
-; SSE-NEXT: movdqa %xmm11, %xmm8
-; SSE-NEXT: pandn %xmm7, %xmm8
-; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm7 # 16-byte Reload
-; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm5 # 16-byte Reload
-; SSE-NEXT: shufps {{.*#+}} xmm5 = xmm5[2,0],xmm7[3,0]
-; SSE-NEXT: shufps {{.*#+}} xmm7 = xmm7[0,1],xmm5[0,2]
-; SSE-NEXT: pshufhw {{.*#+}} xmm7 = xmm7[0,1,2,3,4,6,6,7]
-; SSE-NEXT: pshufd {{.*#+}} xmm7 = xmm7[0,2,2,3]
-; SSE-NEXT: pshuflw {{.*#+}} xmm15 = xmm7[2,1,3,3,4,5,6,7]
-; SSE-NEXT: pand %xmm11, %xmm15
-; SSE-NEXT: por %xmm8, %xmm15
-; SSE-NEXT: shufps {{.*#+}} xmm15 = xmm15[0,1],xmm1[2,0]
-; SSE-NEXT: pshufd $85, {{[-0-9]+}}(%r{{[sb]}}p), %xmm8 # 16-byte Folded Reload
-; SSE-NEXT: # xmm8 = mem[1,1,1,1]
-; SSE-NEXT: pshufd $232, {{[-0-9]+}}(%r{{[sb]}}p), %xmm7 # 16-byte Folded Reload
-; SSE-NEXT: # xmm7 = mem[0,2,2,3]
-; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm6[0,1,1,3]
-; SSE-NEXT: pshuflw {{.*#+}} xmm7 = xmm7[0,1,0,3,4,5,6,7]
-; SSE-NEXT: pshufhw {{.*#+}} xmm1 = xmm1[0,1,2,3,4,5,4,7]
-; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[3,1],xmm7[1,3]
-; SSE-NEXT: punpckldq {{.*#+}} xmm7 = xmm7[0],xmm8[0],xmm7[1],xmm8[1]
-; SSE-NEXT: movdqa %xmm11, %xmm8
-; SSE-NEXT: pandn %xmm7, %xmm8
-; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm5 # 16-byte Reload
-; SSE-NEXT: shufps {{.*#+}} xmm5 = xmm5[2,0],xmm9[3,0]
-; SSE-NEXT: shufps {{.*#+}} xmm9 = xmm9[0,1],xmm5[0,2]
-; SSE-NEXT: pshufhw {{.*#+}} xmm7 = xmm9[0,1,2,3,4,6,6,7]
-; SSE-NEXT: pshufd {{.*#+}} xmm7 = xmm7[0,2,2,3]
-; SSE-NEXT: pshuflw {{.*#+}} xmm9 = xmm7[2,1,3,3,4,5,6,7]
-; SSE-NEXT: pand %xmm11, %xmm9
-; SSE-NEXT: por %xmm8, %xmm9
-; SSE-NEXT: shufps {{.*#+}} xmm9 = xmm9[0,1],xmm1[2,0]
-; SSE-NEXT: pshufd $85, {{[-0-9]+}}(%r{{[sb]}}p), %xmm8 # 16-byte Folded Reload
-; SSE-NEXT: # xmm8 = mem[1,1,1,1]
-; SSE-NEXT: pshufd $232, {{[-0-9]+}}(%r{{[sb]}}p), %xmm7 # 16-byte Folded Reload
-; SSE-NEXT: # xmm7 = mem[0,2,2,3]
-; SSE-NEXT: pshufd $212, {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
-; SSE-NEXT: # xmm1 = mem[0,1,1,3]
-; SSE-NEXT: pshuflw {{.*#+}} xmm7 = xmm7[0,1,0,3,4,5,6,7]
-; SSE-NEXT: pshufhw {{.*#+}} xmm1 = xmm1[0,1,2,3,4,5,4,7]
-; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[3,1],xmm7[1,3]
-; SSE-NEXT: punpckldq {{.*#+}} xmm7 = xmm7[0],xmm8[0],xmm7[1],xmm8[1]
-; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm6 # 16-byte Reload
-; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm5 # 16-byte Reload
-; SSE-NEXT: shufps {{.*#+}} xmm5 = xmm5[2,0],xmm6[3,0]
-; SSE-NEXT: shufps {{.*#+}} xmm6 = xmm6[0,1],xmm5[0,2]
-; SSE-NEXT: pshufhw {{.*#+}} xmm6 = xmm6[0,1,2,3,4,6,6,7]
-; SSE-NEXT: pshufd {{.*#+}} xmm6 = xmm6[0,2,2,3]
-; SSE-NEXT: pshuflw {{.*#+}} xmm6 = xmm6[2,1,3,3,4,5,6,7]
-; SSE-NEXT: pand %xmm11, %xmm6
-; SSE-NEXT: pandn %xmm7, %xmm11
-; SSE-NEXT: por %xmm6, %xmm11
-; SSE-NEXT: shufps {{.*#+}} xmm11 = xmm11[0,1],xmm1[2,0]
-; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Reload
-; SSE-NEXT: movaps %xmm1, 32(%rsi)
-; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Reload
-; SSE-NEXT: movaps %xmm1, (%rsi)
-; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Reload
-; SSE-NEXT: movaps %xmm1, 48(%rsi)
-; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Reload
-; SSE-NEXT: movaps %xmm1, 16(%rsi)
+; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[3,1],xmm0[2,3]
+; SSE-NEXT: shufps {{.*#+}} xmm2 = xmm2[0,1],xmm1[2,0]
+; SSE-NEXT: pshuflw {{.*#+}} xmm0 = xmm15[2,2,2,2,4,5,6,7]
+; SSE-NEXT: movdqa %xmm6, %xmm3
+; SSE-NEXT: pandn %xmm0, %xmm3
+; SSE-NEXT: pshufd $85, {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 16-byte Folded Reload
+; SSE-NEXT: # xmm0 = mem[1,1,1,1]
+; SSE-NEXT: pshufd $232, {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Folded Reload
+; SSE-NEXT: # xmm1 = mem[0,2,2,3]
+; SSE-NEXT: punpckldq {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
+; SSE-NEXT: pshuflw {{.*#+}} xmm0 = xmm1[0,3,2,3,4,5,6,7]
+; SSE-NEXT: pshufd {{.*#+}} xmm0 = xmm0[0,2,2,3]
+; SSE-NEXT: pshuflw {{.*#+}} xmm1 = xmm0[1,0,3,3,4,5,6,7]
+; SSE-NEXT: pand %xmm6, %xmm1
+; SSE-NEXT: por %xmm3, %xmm1
+; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm4 # 16-byte Reload
+; SSE-NEXT: movaps %xmm4, %xmm0
+; SSE-NEXT: shufps {{.*#+}} xmm0 = xmm0[2,0],xmm15[3,0]
+; SSE-NEXT: movaps %xmm15, %xmm3
+; SSE-NEXT: shufps {{.*#+}} xmm3 = xmm3[0,1],xmm0[0,2]
+; SSE-NEXT: pshufhw {{.*#+}} xmm0 = xmm3[0,1,2,3,7,4,6,7]
+; SSE-NEXT: movdqa {{[-0-9]+}}(%r{{[sb]}}p), %xmm9 # 16-byte Reload
+; SSE-NEXT: pshufd {{.*#+}} xmm3 = xmm9[0,1,0,3]
+; SSE-NEXT: pshufhw {{.*#+}} xmm3 = xmm3[0,1,2,3,4,5,5,6]
+; SSE-NEXT: shufps {{.*#+}} xmm3 = xmm3[3,1],xmm0[2,3]
+; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[0,1],xmm3[2,0]
+; SSE-NEXT: pshufd $85, {{[-0-9]+}}(%r{{[sb]}}p), %xmm10 # 16-byte Folded Reload
+; SSE-NEXT: # xmm10 = mem[1,1,1,1]
+; SSE-NEXT: pshufd $232, {{[-0-9]+}}(%r{{[sb]}}p), %xmm3 # 16-byte Folded Reload
+; SSE-NEXT: # xmm3 = mem[0,2,2,3]
+; SSE-NEXT: pshufd $212, {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 16-byte Folded Reload
+; SSE-NEXT: # xmm0 = mem[0,1,1,3]
+; SSE-NEXT: pshuflw {{.*#+}} xmm3 = xmm3[0,1,0,3,4,5,6,7]
+; SSE-NEXT: pshufhw {{.*#+}} xmm0 = xmm0[0,1,2,3,4,5,4,7]
+; SSE-NEXT: shufps {{.*#+}} xmm0 = xmm0[3,1],xmm3[1,3]
+; SSE-NEXT: punpckldq {{.*#+}} xmm3 = xmm3[0],xmm10[0],xmm3[1],xmm10[1]
+; SSE-NEXT: movdqa %xmm6, %xmm5
+; SSE-NEXT: pandn %xmm3, %xmm5
+; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm3 # 16-byte Reload
+; SSE-NEXT: movaps (%rsp), %xmm10 # 16-byte Reload
+; SSE-NEXT: shufps {{.*#+}} xmm3 = xmm3[2,0],xmm10[3,0]
+; SSE-NEXT: shufps {{.*#+}} xmm10 = xmm10[0,1],xmm3[0,2]
+; SSE-NEXT: pshufhw {{.*#+}} xmm3 = xmm10[0,1,2,3,4,6,6,7]
+; SSE-NEXT: pshufd {{.*#+}} xmm3 = xmm3[0,2,2,3]
+; SSE-NEXT: pshuflw {{.*#+}} xmm10 = xmm3[2,1,3,3,4,5,6,7]
+; SSE-NEXT: pand %xmm6, %xmm10
+; SSE-NEXT: por %xmm5, %xmm10
+; SSE-NEXT: shufps {{.*#+}} xmm10 = xmm10[0,1],xmm0[2,0]
+; SSE-NEXT: pshufd $85, {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 16-byte Folded Reload
+; SSE-NEXT: # xmm0 = mem[1,1,1,1]
+; SSE-NEXT: pshufd $232, {{[-0-9]+}}(%r{{[sb]}}p), %xmm3 # 16-byte Folded Reload
+; SSE-NEXT: # xmm3 = mem[0,2,2,3]
+; SSE-NEXT: pshufd $212, {{[-0-9]+}}(%r{{[sb]}}p), %xmm5 # 16-byte Folded Reload
+; SSE-NEXT: # xmm5 = mem[0,1,1,3]
+; SSE-NEXT: pshuflw {{.*#+}} xmm3 = xmm3[0,1,0,3,4,5,6,7]
+; SSE-NEXT: pshufhw {{.*#+}} xmm5 = xmm5[0,1,2,3,4,5,4,7]
+; SSE-NEXT: shufps {{.*#+}} xmm5 = xmm5[3,1],xmm3[1,3]
+; SSE-NEXT: punpckldq {{.*#+}} xmm3 = xmm3[0],xmm0[0],xmm3[1],xmm0[1]
+; SSE-NEXT: movdqa %xmm6, %xmm0
+; SSE-NEXT: pandn %xmm3, %xmm0
+; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm3 # 16-byte Reload
+; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm12 # 16-byte Reload
+; SSE-NEXT: shufps {{.*#+}} xmm3 = xmm3[2,0],xmm12[3,0]
+; SSE-NEXT: shufps {{.*#+}} xmm12 = xmm12[0,1],xmm3[0,2]
+; SSE-NEXT: pshufhw {{.*#+}} xmm3 = xmm12[0,1,2,3,4,6,6,7]
+; SSE-NEXT: pshufd {{.*#+}} xmm3 = xmm3[0,2,2,3]
+; SSE-NEXT: pshuflw {{.*#+}} xmm12 = xmm3[2,1,3,3,4,5,6,7]
+; SSE-NEXT: pand %xmm6, %xmm12
+; SSE-NEXT: por %xmm0, %xmm12
+; SSE-NEXT: shufps {{.*#+}} xmm12 = xmm12[0,1],xmm5[2,0]
+; SSE-NEXT: pshufd {{.*#+}} xmm0 = xmm15[1,1,1,1]
+; SSE-NEXT: pshufd {{.*#+}} xmm3 = xmm4[0,2,2,3]
+; SSE-NEXT: pshufd {{.*#+}} xmm5 = xmm9[0,1,1,3]
+; SSE-NEXT: pshuflw {{.*#+}} xmm3 = xmm3[0,1,0,3,4,5,6,7]
+; SSE-NEXT: pshufhw {{.*#+}} xmm5 = xmm5[0,1,2,3,4,5,4,7]
+; SSE-NEXT: shufps {{.*#+}} xmm5 = xmm5[3,1],xmm3[1,3]
+; SSE-NEXT: punpckldq {{.*#+}} xmm3 = xmm3[0],xmm0[0],xmm3[1],xmm0[1]
+; SSE-NEXT: movdqa %xmm6, %xmm0
+; SSE-NEXT: pandn %xmm3, %xmm0
+; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm3 # 16-byte Reload
+; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm4 # 16-byte Reload
+; SSE-NEXT: shufps {{.*#+}} xmm4 = xmm4[2,0],xmm3[3,0]
+; SSE-NEXT: shufps {{.*#+}} xmm3 = xmm3[0,1],xmm4[0,2]
+; SSE-NEXT: pshufhw {{.*#+}} xmm3 = xmm3[0,1,2,3,4,6,6,7]
+; SSE-NEXT: pshufd {{.*#+}} xmm3 = xmm3[0,2,2,3]
+; SSE-NEXT: pshuflw {{.*#+}} xmm9 = xmm3[2,1,3,3,4,5,6,7]
+; SSE-NEXT: pand %xmm6, %xmm9
+; SSE-NEXT: por %xmm0, %xmm9
+; SSE-NEXT: shufps {{.*#+}} xmm9 = xmm9[0,1],xmm5[2,0]
+; SSE-NEXT: pshufd $85, {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 16-byte Folded Reload
+; SSE-NEXT: # xmm0 = mem[1,1,1,1]
+; SSE-NEXT: pshufd $232, {{[-0-9]+}}(%r{{[sb]}}p), %xmm3 # 16-byte Folded Reload
+; SSE-NEXT: # xmm3 = mem[0,2,2,3]
+; SSE-NEXT: pshufd $212, {{[-0-9]+}}(%r{{[sb]}}p), %xmm5 # 16-byte Folded Reload
+; SSE-NEXT: # xmm5 = mem[0,1,1,3]
+; SSE-NEXT: pshuflw {{.*#+}} xmm3 = xmm3[0,1,0,3,4,5,6,7]
+; SSE-NEXT: pshufhw {{.*#+}} xmm5 = xmm5[0,1,2,3,4,5,4,7]
+; SSE-NEXT: shufps {{.*#+}} xmm5 = xmm5[3,1],xmm3[1,3]
+; SSE-NEXT: punpckldq {{.*#+}} xmm3 = xmm3[0],xmm0[0],xmm3[1],xmm0[1]
+; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 16-byte Reload
+; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm15 # 16-byte Reload
+; SSE-NEXT: shufps {{.*#+}} xmm15 = xmm15[2,0],xmm0[3,0]
+; SSE-NEXT: shufps {{.*#+}} xmm0 = xmm0[0,1],xmm15[0,2]
+; SSE-NEXT: pshufhw {{.*#+}} xmm0 = xmm0[0,1,2,3,4,6,6,7]
+; SSE-NEXT: pshufd {{.*#+}} xmm0 = xmm0[0,2,2,3]
+; SSE-NEXT: pshuflw {{.*#+}} xmm0 = xmm0[2,1,3,3,4,5,6,7]
+; SSE-NEXT: pand %xmm6, %xmm0
+; SSE-NEXT: pandn %xmm3, %xmm6
+; SSE-NEXT: por %xmm0, %xmm6
+; SSE-NEXT: shufps {{.*#+}} xmm6 = xmm6[0,1],xmm5[2,0]
+; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 16-byte Reload
+; SSE-NEXT: movaps %xmm0, 32(%rsi)
+; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 16-byte Reload
+; SSE-NEXT: movaps %xmm0, (%rsi)
+; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 16-byte Reload
+; SSE-NEXT: movaps %xmm0, 48(%rsi)
+; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 16-byte Reload
+; SSE-NEXT: movaps %xmm0, 16(%rsi)
; SSE-NEXT: movdqa %xmm13, 32(%rdx)
-; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Reload
-; SSE-NEXT: movaps %xmm1, (%rdx)
-; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Reload
-; SSE-NEXT: movaps %xmm1, 48(%rdx)
-; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Reload
-; SSE-NEXT: movaps %xmm1, 16(%rdx)
-; SSE-NEXT: movaps %xmm12, 32(%rcx)
-; SSE-NEXT: movaps %xmm14, (%rcx)
-; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Reload
-; SSE-NEXT: movaps %xmm1, 48(%rcx)
-; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Reload
-; SSE-NEXT: movaps %xmm1, 16(%rcx)
-; SSE-NEXT: movaps %xmm0, 32(%r8)
+; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 16-byte Reload
+; SSE-NEXT: movaps %xmm0, (%rdx)
+; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 16-byte Reload
+; SSE-NEXT: movaps %xmm0, 48(%rdx)
+; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 16-byte Reload
+; SSE-NEXT: movaps %xmm0, 16(%rdx)
+; SSE-NEXT: movaps %xmm7, 32(%rcx)
+; SSE-NEXT: movaps %xmm11, (%rcx)
+; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 16-byte Reload
+; SSE-NEXT: movaps %xmm0, 48(%rcx)
+; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 16-byte Reload
+; SSE-NEXT: movaps %xmm0, 16(%rcx)
+; SSE-NEXT: movaps %xmm1, 32(%r8)
; SSE-NEXT: movaps %xmm2, (%r8)
-; SSE-NEXT: movaps %xmm3, 48(%r8)
-; SSE-NEXT: movaps %xmm4, 16(%r8)
-; SSE-NEXT: movaps %xmm11, (%r9)
+; SSE-NEXT: movaps %xmm8, 48(%r8)
+; SSE-NEXT: movaps %xmm14, 16(%r8)
+; SSE-NEXT: movaps %xmm6, (%r9)
; SSE-NEXT: movaps %xmm9, 32(%r9)
-; SSE-NEXT: movaps %xmm15, 48(%r9)
+; SSE-NEXT: movaps %xmm12, 48(%r9)
; SSE-NEXT: movaps %xmm10, 16(%r9)
; SSE-NEXT: addq $344, %rsp # imm = 0x158
; SSE-NEXT: retq
More information about the llvm-commits
mailing list