This is implicit in the value type checks in getSubVectorSrc - this just makes it upfront and obvious.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367220
91177308-0d34-0410-b5e6-
96231b3b80d8
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))