[X86] Simplify by pulling out valuetype. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295502 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Simon Pilgrim 2017-02-17 22:10:10 +00:00
parent dc5aad66ca
commit 4231bd0a9d

View File

@ -28503,14 +28503,14 @@ static SDValue combineBitcast(SDNode *N, SelectionDAG &DAG,
const X86Subtarget &Subtarget) {
SDValue N0 = N->getOperand(0);
EVT VT = N->getValueType(0);
EVT SrcVT = N0.getValueType();
// Detect bitcasts between i32 to x86mmx low word. Since MMX types are
// special and don't usually play with other vector types, it's better to
// handle them early to be sure we emit efficient code by avoiding
// store-load conversions.
if (VT == MVT::x86mmx && N0.getOpcode() == ISD::BUILD_VECTOR &&
N0.getValueType() == MVT::v2i32 &&
isNullConstant(N0.getOperand(1))) {
SrcVT == MVT::v2i32 && isNullConstant(N0.getOperand(1))) {
SDValue N00 = N0->getOperand(0);
if (N00.getValueType() == MVT::i32)
return DAG.getNode(X86ISD::MMX_MOVW2D, SDLoc(N00), VT, N00);