[llvm] r294640 - [X86] Remove duplicate call to getValueType. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 9 14:36:00 PST 2017
Author: rksimon
Date: Thu Feb 9 16:35:59 2017
New Revision: 294640
URL: http://llvm.org/viewvc/llvm-project?rev=294640&view=rev
Log:
[X86] Remove duplicate call to getValueType. NFCI.
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=294640&r1=294639&r2=294640&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Thu Feb 9 16:35:59 2017
@@ -28791,12 +28791,13 @@ static SDValue combineExtractVectorElt(S
if (SDValue NewOp = XFormVExtractWithShuffleIntoLoad(N, DAG, DCI))
return NewOp;
+ EVT VT = N->getValueType(0);
SDValue InputVector = N->getOperand(0);
SDLoc dl(InputVector);
+
// Detect mmx to i32 conversion through a v2i32 elt extract.
if (InputVector.getOpcode() == ISD::BITCAST && InputVector.hasOneUse() &&
- N->getValueType(0) == MVT::i32 &&
- InputVector.getValueType() == MVT::v2i32 &&
+ VT == MVT::i32 && InputVector.getValueType() == MVT::v2i32 &&
isa<ConstantSDNode>(N->getOperand(1)) &&
N->getConstantOperandVal(1) == 0) {
SDValue MMXSrc = InputVector.getOperand(0);
@@ -28806,8 +28807,6 @@ static SDValue combineExtractVectorElt(S
return DAG.getNode(X86ISD::MMX_MOVD2W, dl, MVT::i32, MMXSrc);
}
- EVT VT = N->getValueType(0);
-
if (VT == MVT::i1 && isa<ConstantSDNode>(N->getOperand(1)) &&
InputVector.getOpcode() == ISD::BITCAST &&
isa<ConstantSDNode>(InputVector.getOperand(0))) {
More information about the llvm-commits
mailing list