[VPlan] Assert instead of check if VF is vector when widening GEPs(NFC)
VPWidenGEPRecipe should not be generated for scalar VFs. Replace check with an assert.
This commit is contained in:
@@ -787,6 +787,7 @@ void VPScalarIVStepsRecipe::print(raw_ostream &O, const Twine &Indent,
|
||||
#endif
|
||||
|
||||
void VPWidenGEPRecipe::execute(VPTransformState &State) {
|
||||
assert(State.VF.isVector() && "not widening");
|
||||
auto *GEP = cast<GetElementPtrInst>(getUnderlyingInstr());
|
||||
// Construct a vector GEP by widening the operands of the scalar GEP as
|
||||
// necessary. We mark the vector GEP 'inbounds' if appropriate. A GEP
|
||||
@@ -794,7 +795,7 @@ void VPWidenGEPRecipe::execute(VPTransformState &State) {
|
||||
// is vector-typed. Thus, to keep the representation compact, we only use
|
||||
// vector-typed operands for loop-varying values.
|
||||
|
||||
if (State.VF.isVector() && areAllOperandsInvariant()) {
|
||||
if (areAllOperandsInvariant()) {
|
||||
// If we are vectorizing, but the GEP has only loop-invariant operands,
|
||||
// the GEP we build (by only using vector-typed operands for
|
||||
// loop-varying values) would be a scalar pointer. Thus, to ensure we
|
||||
|
||||
Reference in New Issue
Block a user