summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2019-07-29 11:34:45 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2019-07-29 11:34:45 +0000
commitf8a7e9de065904e3d799d4eeb10c738e160dcea9 (patch)
treeb093e72d8720891e90102cb116b523c6206729c8 /llvm/lib
parent0e074fa0fcbeb66f4f6d4eedd8577e872fdcc101 (diff)
downloadbcm5719-llvm-f8a7e9de065904e3d799d4eeb10c738e160dcea9.tar.gz
bcm5719-llvm-f8a7e9de065904e3d799d4eeb10c738e160dcea9.zip
[DAGCombine] narrowInsertExtractVectorBinOp - early out for binops that change value type. NFCI.
This is implicit in the value type checks in getSubVectorSrc - this just makes it upfront and obvious. llvm-svn: 367220
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 4b3db73875b..835425021dc 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -18020,7 +18020,11 @@ static SDValue narrowInsertExtractVectorBinOp(SDNode *Extract,
if (!TLI.isBinOp(BinOpcode) || BinOp.getNode()->getNumValues() != 1)
return SDValue();
+ EVT VecVT = BinOp.getValueType();
SDValue Bop0 = BinOp.getOperand(0), Bop1 = BinOp.getOperand(1);
+ if (VecVT != Bop0.getValueType() || VecVT != Bop1.getValueType())
+ return SDValue();
+
SDValue Index = Extract->getOperand(1);
EVT SubVT = Extract->getValueType(0);
if (!TLI.isOperationLegalOrCustom(BinOpcode, SubVT))
OpenPOWER on IntegriCloud