llvm.org GIT mirror llvm / a87ccce
Revert r112942, "Use punpckh and unpckh family of nodes instead of using unpckh mask pattern fragment", which depends on r112934, which introduced some infinite loop and select failures. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112998 91177308-0d34-0410-b5e6-96231b3b80d8 Daniel Dunbar 10 years ago
1 changed file(s) with 3 addition(s) and 23 deletion(s). Raw diff Collapse all Expand all
26082608 case X86ISD::PUNPCKLDQ:
26092609 case X86ISD::PUNPCKLQDQ:
26102610 case X86ISD::UNPCKHPS:
2611 case X86ISD::UNPCKHPD:
26122611 case X86ISD::PUNPCKHWD:
26132612 case X86ISD::PUNPCKHBW:
26142613 case X86ISD::PUNPCKHDQ:
2615 case X86ISD::PUNPCKHQDQ:
26162614 return true;
26172615 }
26182616 return false;
26732671 case X86ISD::PUNPCKLDQ:
26742672 case X86ISD::PUNPCKLQDQ:
26752673 case X86ISD::UNPCKHPS:
2676 case X86ISD::UNPCKHPD:
26772674 case X86ISD::PUNPCKHWD:
26782675 case X86ISD::PUNPCKHBW:
26792676 case X86ISD::PUNPCKHDQ:
2680 case X86ISD::PUNPCKHQDQ:
26812677 return DAG.getNode(Opc, dl, VT, V1, V2);
26822678 }
26832679 return SDValue();
52265222 return 0;
52275223 }
52285224
5229 static unsigned getUNPCKHOpcode(EVT VT) {
5230 switch(VT.getSimpleVT().SimpleTy) {
5231 case MVT::v4i32: return X86ISD::PUNPCKHDQ;
5232 case MVT::v2i64: return X86ISD::PUNPCKHQDQ;
5233 case MVT::v4f32: return X86ISD::UNPCKHPS;
5234 case MVT::v2f64: return X86ISD::UNPCKHPD;
5235 case MVT::v16i8: return X86ISD::PUNPCKHBW;
5236 case MVT::v8i16: return X86ISD::PUNPCKHWD;
5237 default:
5238 llvm_unreachable("Unknow type for unpckh");
5239 }
5240 return 0;
5241 }
5242
52435225 SDValue
52445226 X86TargetLowering::LowerVECTOR_SHUFFLE(SDValue Op, SelectionDAG &DAG) const {
52455227 ShuffleVectorSDNode *SVOp = cast(Op);
54305412 Op : getTargetShuffleNode(getUNPCKLOpcode(VT), dl, VT, V1, V2, DAG);
54315413
54325414 if (X86::isUNPCKHMask(SVOp))
5433 return (isMMX) ?
5434 Op : getTargetShuffleNode(getUNPCKHOpcode(VT), dl, VT, V1, V2, DAG);
5415 return Op;
54355416
54365417 if (V2IsSplat) {
54375418 // Normalize mask so all entries that point to V2 points to its first
54565437
54575438 if (X86::isUNPCKLMask(NewSVOp))
54585439 return (isMMX) ?
5459 NewOp : getTargetShuffleNode(getUNPCKLOpcode(VT), dl, VT, V2, V1, DAG);
5440 Op : getTargetShuffleNode(getUNPCKLOpcode(VT), dl, VT, V2, V1, DAG);
54605441
54615442 if (X86::isUNPCKHMask(NewSVOp))
5462 return (isMMX) ?
5463 NewOp : getTargetShuffleNode(getUNPCKHOpcode(VT), dl, VT, V2, V1, DAG);
5443 return NewOp;
54645444 }
54655445
54665446 // FIXME: for mmx, bitcast v2i32 to v4i16 for shuffle.