mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-24 13:06:56 +00:00
[x86] Fix a bad predicate I spotted by inspection -- pshufhw and pshuflw
were added in SSE2, no SSSE3. Found this while auditing all uses of SSSE3 in the X86 target. I don't actually expect this to make a significant difference on anything and I don't have any detailed test cases but I updated the existing test cases that already covered some of this code path. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209056 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
bf6e3f9257
commit
2ff4a49344
@ -6719,7 +6719,7 @@ LowerVECTOR_SHUFFLEv8i16(SDValue Op, const X86Subtarget *Subtarget,
|
||||
NewV = DAG.getVectorShuffle(MVT::v8i16, dl, NewV, DAG.getUNDEF(MVT::v8i16),
|
||||
&MaskV[0]);
|
||||
|
||||
if (NewV.getOpcode() == ISD::VECTOR_SHUFFLE && Subtarget->hasSSSE3()) {
|
||||
if (NewV.getOpcode() == ISD::VECTOR_SHUFFLE && Subtarget->hasSSE2()) {
|
||||
ShuffleVectorSDNode *SVOp = cast<ShuffleVectorSDNode>(NewV.getNode());
|
||||
NewV = getTargetShuffleNode(X86ISD::PSHUFLW, dl, MVT::v8i16,
|
||||
NewV.getOperand(0),
|
||||
@ -6743,7 +6743,7 @@ LowerVECTOR_SHUFFLEv8i16(SDValue Op, const X86Subtarget *Subtarget,
|
||||
NewV = DAG.getVectorShuffle(MVT::v8i16, dl, NewV, DAG.getUNDEF(MVT::v8i16),
|
||||
&MaskV[0]);
|
||||
|
||||
if (NewV.getOpcode() == ISD::VECTOR_SHUFFLE && Subtarget->hasSSSE3()) {
|
||||
if (NewV.getOpcode() == ISD::VECTOR_SHUFFLE && Subtarget->hasSSE2()) {
|
||||
ShuffleVectorSDNode *SVOp = cast<ShuffleVectorSDNode>(NewV.getNode());
|
||||
NewV = getTargetShuffleNode(X86ISD::PSHUFHW, dl, MVT::v8i16,
|
||||
NewV.getOperand(0),
|
||||
|
@ -209,7 +209,7 @@ entry:
|
||||
; X64-LABEL: t13:
|
||||
; X64: punpcklqdq %xmm0, %xmm1
|
||||
; X64: pextrw $3, %xmm1, %eax
|
||||
; X64: pshufd $52, %xmm1, %xmm0
|
||||
; X64: pshufhw $12, %xmm1, %xmm0
|
||||
; X64: pinsrw $4, %eax, %xmm0
|
||||
; X64: ret
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user