Skip to content

Commit c1ca4a5

Browse files
authored
[VPlan] Strip redundant code in VPTransformState::get (NFC) (#166145)
vputils::isSingleScalar is sufficient.
1 parent 5da2c09 commit c1ca4a5

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

llvm/lib/Transforms/Vectorize/VPlan.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -304,18 +304,7 @@ Value *VPTransformState::get(const VPValue *Def, bool NeedsScalar) {
304304
}
305305

306306
bool IsSingleScalar = vputils::isSingleScalar(Def);
307-
308307
VPLane LastLane(IsSingleScalar ? 0 : VF.getFixedValue() - 1);
309-
// Check if there is a scalar value for the selected lane.
310-
if (!hasScalarValue(Def, LastLane)) {
311-
// At the moment, VPWidenIntOrFpInductionRecipes, VPScalarIVStepsRecipes and
312-
// VPExpandSCEVRecipes can also be a single scalar.
313-
assert((isa<VPWidenIntOrFpInductionRecipe, VPScalarIVStepsRecipe,
314-
VPExpandSCEVRecipe>(Def->getDefiningRecipe())) &&
315-
"unexpected recipe found to be invariant");
316-
IsSingleScalar = true;
317-
LastLane = 0;
318-
}
319308

320309
// We need to construct the vector value for a single-scalar value by
321310
// broadcasting the scalar to all lanes.

0 commit comments

Comments
 (0)