llvm.org GIT mirror llvm / be8b084
Reapply piecies of r112942 and r112934 which don't do functional changes git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113007 91177308-0d34-0410-b5e6-96231b3b80d8 Bruno Cardoso Lopes 10 years ago
1 changed file(s) with 36 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
26012601 case X86ISD::MOVSS:
26022602 case X86ISD::MOVSD:
26032603 case X86ISD::UNPCKLPS:
2604 case X86ISD::UNPCKLPD:
26042605 case X86ISD::PUNPCKLWD:
26052606 case X86ISD::PUNPCKLBW:
26062607 case X86ISD::PUNPCKLDQ:
2608 case X86ISD::PUNPCKLQDQ:
26072609 case X86ISD::UNPCKHPS:
2610 case X86ISD::UNPCKHPD:
26082611 case X86ISD::PUNPCKHWD:
26092612 case X86ISD::PUNPCKHBW:
26102613 case X86ISD::PUNPCKHDQ:
2614 case X86ISD::PUNPCKHQDQ:
26112615 return true;
26122616 }
26132617 return false;
26622666 case X86ISD::MOVSS:
26632667 case X86ISD::MOVSD:
26642668 case X86ISD::UNPCKLPS:
2669 case X86ISD::UNPCKLPD:
26652670 case X86ISD::PUNPCKLWD:
26662671 case X86ISD::PUNPCKLBW:
26672672 case X86ISD::PUNPCKLDQ:
2673 case X86ISD::PUNPCKLQDQ:
26682674 case X86ISD::UNPCKHPS:
2675 case X86ISD::UNPCKHPD:
26692676 case X86ISD::PUNPCKHWD:
26702677 case X86ISD::PUNPCKHBW:
26712678 case X86ISD::PUNPCKHDQ:
2679 case X86ISD::PUNPCKHQDQ:
26722680 return DAG.getNode(Opc, dl, VT, V1, V2);
26732681 }
26742682 return SDValue();
51395147 // Invert the operand order and use SHUFPS to match it.
51405148 return getTargetShuffleNode(X86ISD::SHUFPS, dl, VT, V2, V1,
51415149 X86::getShuffleSHUFImmediate(SVOp), DAG);
5150 }
5151
5152 static inline unsigned getUNPCKLOpcode(EVT VT) {
5153 switch(VT.getSimpleVT().SimpleTy) {
5154 case MVT::v4i32: return X86ISD::PUNPCKLDQ;
5155 case MVT::v2i64: return X86ISD::PUNPCKLQDQ;
5156 case MVT::v4f32: return X86ISD::UNPCKLPS;
5157 case MVT::v2f64: return X86ISD::UNPCKLPD;
5158 case MVT::v16i8: return X86ISD::PUNPCKLBW;
5159 case MVT::v8i16: return X86ISD::PUNPCKLWD;
5160 default:
5161 llvm_unreachable("Unknow type for unpckl");
5162 }
5163 return 0;
5164 }
5165
5166 static inline unsigned getUNPCKHOpcode(EVT VT) {
5167 switch(VT.getSimpleVT().SimpleTy) {
5168 case MVT::v4i32: return X86ISD::PUNPCKHDQ;
5169 case MVT::v2i64: return X86ISD::PUNPCKHQDQ;
5170 case MVT::v4f32: return X86ISD::UNPCKHPS;
5171 case MVT::v2f64: return X86ISD::UNPCKHPD;
5172 case MVT::v16i8: return X86ISD::PUNPCKHBW;
5173 case MVT::v8i16: return X86ISD::PUNPCKHWD;
5174 default:
5175 llvm_unreachable("Unknow type for unpckh");
5176 }
5177 return 0;
51425178 }
51435179
51445180 SDValue