forked from OSchip/llvm-project
[X86][SSE] Detect unary PBLEND shuffles.
These can appear during shuffle combining. llvm-svn: 293628
This commit is contained in:
parent
c29eab52e8
commit
4eab18f6b8
|
@ -5397,6 +5397,7 @@ static bool getTargetShuffleMask(SDNode *N, MVT VT, bool AllowSentinelZero,
|
||||||
case X86ISD::BLENDI:
|
case X86ISD::BLENDI:
|
||||||
ImmN = N->getOperand(N->getNumOperands()-1);
|
ImmN = N->getOperand(N->getNumOperands()-1);
|
||||||
DecodeBLENDMask(VT, cast<ConstantSDNode>(ImmN)->getZExtValue(), Mask);
|
DecodeBLENDMask(VT, cast<ConstantSDNode>(ImmN)->getZExtValue(), Mask);
|
||||||
|
IsUnary = IsFakeUnary = N->getOperand(0) == N->getOperand(1);
|
||||||
break;
|
break;
|
||||||
case X86ISD::SHUFP:
|
case X86ISD::SHUFP:
|
||||||
ImmN = N->getOperand(N->getNumOperands()-1);
|
ImmN = N->getOperand(N->getNumOperands()-1);
|
||||||
|
|
|
@ -94,8 +94,7 @@ define <8 x i16> @_clearupper8xi16a(<8 x i16>) nounwind {
|
||||||
;
|
;
|
||||||
; AVX-LABEL: _clearupper8xi16a:
|
; AVX-LABEL: _clearupper8xi16a:
|
||||||
; AVX: # BB#0:
|
; AVX: # BB#0:
|
||||||
; AVX-NEXT: vpblendw {{.*#+}} xmm0 = xmm0[0,1,2,3,4,5,6,7]
|
; AVX-NEXT: vandps {{.*}}(%rip), %xmm0, %xmm0
|
||||||
; AVX-NEXT: vpand {{.*}}(%rip), %xmm0, %xmm0
|
|
||||||
; AVX-NEXT: retq
|
; AVX-NEXT: retq
|
||||||
%x0 = extractelement <8 x i16> %0, i32 0
|
%x0 = extractelement <8 x i16> %0, i32 0
|
||||||
%x1 = extractelement <8 x i16> %0, i32 1
|
%x1 = extractelement <8 x i16> %0, i32 1
|
||||||
|
|
Loading…
Reference in New Issue