GlobalISel: Assert if MoreElements uses a non-vector type

This commit is contained in:
Matt Arsenault 2020-09-26 10:14:14 -04:00
parent 56e077581a
commit e0193632ad

View File

@ -148,7 +148,8 @@ static bool mutationIsSane(const LegalizeRule &Rule,
if (NewTy.getNumElements() <= OldElts)
return false;
}
}
} else if (Rule.getAction() == MoreElements)
return false;
// Make sure the element type didn't change.
return NewTy.getScalarType() == OldTy.getScalarType();