From: Simon Pilgrim Date: Fri, 17 Feb 2017 22:10:10 +0000 (+0000) Subject: [X86] Simplify by pulling out valuetype. NFCI. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4231bd0a9db212086e56874a68bcb8dc73a5b10a;p=llvm [X86] Simplify by pulling out valuetype. NFCI. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295502 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index 0ee09110a5e..57d937dd545 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -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);