summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2017-02-09 22:35:59 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2017-02-09 22:35:59 +0000
commit7f0d7e08b2e63f6344d662e79092fbefe137ff2b (patch)
treea2ddc6b8253ec961d02fa771831f7b9adf65f6cc /llvm/lib
parent3af700977bdc3047044f22409f0e8aa24daae0f7 (diff)
downloadbcm5719-llvm-7f0d7e08b2e63f6344d662e79092fbefe137ff2b.tar.gz
bcm5719-llvm-7f0d7e08b2e63f6344d662e79092fbefe137ff2b.zip
[X86] Remove duplicate call to getValueType. NFCI.
llvm-svn: 294640
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/X86/X86ISelLowering.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index ef955939c6c..86b78fe5193 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -28791,12 +28791,13 @@ static SDValue combineExtractVectorElt(SDNode *N, SelectionDAG &DAG,
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(SDNode *N, SelectionDAG &DAG,
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))) {
OpenPOWER on IntegriCloud