Skip to content

Commit b031f70

Browse files
committed
PR8200: The MMX unpack instructions were no longer selected. Reverted the parts
that caused this to happen. llvm-svn: 115298
1 parent 0114c8d commit b031f70

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5414,11 +5414,11 @@ X86TargetLowering::LowerVECTOR_SHUFFLE(SDValue Op, SelectionDAG &DAG) const {
54145414
return getMOVL(DAG, dl, VT, V2, V1);
54155415
}
54165416

5417-
if (X86::isUNPCKLMask(SVOp))
5417+
if (X86::isUNPCKL_v_undef_Mask(SVOp) || X86::isUNPCKLMask(SVOp))
54185418
return (isMMX) ?
54195419
Op : getTargetShuffleNode(getUNPCKLOpcode(VT), dl, VT, V1, V2, DAG);
54205420

5421-
if (X86::isUNPCKHMask(SVOp))
5421+
if (X86::isUNPCKH_v_undef_Mask(SVOp) || X86::isUNPCKHMask(SVOp))
54225422
return (isMMX) ?
54235423
Op : getTargetShuffleNode(getUNPCKHOpcode(VT), dl, VT, V1, V2, DAG);
54245424

@@ -5443,11 +5443,11 @@ X86TargetLowering::LowerVECTOR_SHUFFLE(SDValue Op, SelectionDAG &DAG) const {
54435443
SDValue NewOp = CommuteVectorShuffle(SVOp, DAG);
54445444
ShuffleVectorSDNode *NewSVOp = cast<ShuffleVectorSDNode>(NewOp);
54455445

5446-
if (X86::isUNPCKLMask(NewSVOp))
5446+
if (X86::isUNPCKL_v_undef_Mask(NewSVOp) || X86::isUNPCKLMask(NewSVOp))
54475447
return (isMMX) ?
54485448
NewOp : getTargetShuffleNode(getUNPCKLOpcode(VT), dl, VT, V2, V1, DAG);
54495449

5450-
if (X86::isUNPCKHMask(NewSVOp))
5450+
if (X86::isUNPCKH_v_undef_Mask(NewSVOp) || X86::isUNPCKHMask(NewSVOp))
54515451
return (isMMX) ?
54525452
NewOp : getTargetShuffleNode(getUNPCKHOpcode(VT), dl, VT, V2, V1, DAG);
54535453
}
@@ -5494,13 +5494,6 @@ X86TargetLowering::LowerVECTOR_SHUFFLE(SDValue Op, SelectionDAG &DAG) const {
54945494
TargetMask, DAG);
54955495
}
54965496

5497-
if (X86::isUNPCKL_v_undef_Mask(SVOp))
5498-
if (VT != MVT::v2i64 && VT != MVT::v2f64)
5499-
return getTargetShuffleNode(getUNPCKLOpcode(VT), dl, VT, V1, V1, DAG);
5500-
if (X86::isUNPCKH_v_undef_Mask(SVOp))
5501-
if (VT != MVT::v2i64 && VT != MVT::v2f64)
5502-
return getTargetShuffleNode(getUNPCKHOpcode(VT), dl, VT, V1, V1, DAG);
5503-
55045497
// Handle v8i16 specifically since SSE can do byte extraction and insertion.
55055498
if (VT == MVT::v8i16) {
55065499
SDValue NewOp = LowerVECTOR_SHUFFLEv8i16(Op, DAG);

0 commit comments

Comments
 (0)