[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:
parent
9ff9bf4959
commit
24057b9566
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue