[DAG] Ensure vector constant folding uses correct scalar undef types

Minor fix to D13665 found during post-commit review.

llvm-svn: 250616
This commit is contained in:
Simon Pilgrim 2015-10-17 16:49:43 +00:00
parent 9ff9bf4959
commit 24057b9566
1 changed files with 2 additions and 2 deletions

View File

@ -3321,11 +3321,11 @@ SDValue SelectionDAG::FoldConstantVectorArithmetic(unsigned Opcode, SDLoc DL,
for (unsigned i = 0; i != NumElts; i++) {
SmallVector<SDValue, 4> ScalarOps;
for (SDValue Op : Ops) {
EVT InSVT = Op->getValueType(0).getScalarType();
EVT InSVT = Op.getValueType().getScalarType();
BuildVectorSDNode *InBV = dyn_cast<BuildVectorSDNode>(Op);
if (!InBV) {
// We've checked that this is UNDEF above.
ScalarOps.push_back(getUNDEF(LegalSVT));
ScalarOps.push_back(getUNDEF(InSVT));
continue;
}