Skip to content

Commit c5d780b

Browse files
authored
[VPlan] Remove no longer needed VP intrinsic handling in VPWidenIntrinsicRecipe::computeCost. NFCI (#137573)
Whenever calls were transformed to VP intrinsics with EVL tail folding in #110412, this workaround was added in computeCost to avoid an assertion when checking ICA.getArgs(). However it turned out that the actual arguments were never used and this assertion was removed in #115983 afterwards, so it's now fine to leave the arguments empty and use the type based cost instead. The type based cost and value based cost are the same for these VP intrinsics. This was tested by adding back in the transformation code in #110412 and checking that no assertions were still hit.
1 parent c5c4f0d commit c5d780b

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1333,15 +1333,6 @@ InstructionCost VPWidenIntrinsicRecipe::computeCost(ElementCount VF,
13331333
for (const auto &[Idx, Op] : enumerate(operands())) {
13341334
auto *V = Op->getUnderlyingValue();
13351335
if (!V) {
1336-
// Push all the VP Intrinsic's ops into the Argments even if is nullptr.
1337-
// Some VP Intrinsic's cost will assert the number of parameters.
1338-
// Mainly appears in the following two scenarios:
1339-
// 1. EVL Op is nullptr
1340-
// 2. The Argmunt of the VP Intrinsic is also the VP Intrinsic
1341-
if (VPIntrinsic::isVPIntrinsic(VectorIntrinsicID)) {
1342-
Arguments.push_back(V);
1343-
continue;
1344-
}
13451336
if (auto *UI = dyn_cast_or_null<CallBase>(getUnderlyingValue())) {
13461337
Arguments.push_back(UI->getArgOperand(Idx));
13471338
continue;

0 commit comments

Comments
 (0)