[llvm] [VPlan] Run initial recipe simplification on VPlan0. (PR #176828)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 11 07:09:20 PST 2026
================
@@ -1219,15 +1219,25 @@ static void simplifyRecipe(VPSingleDefRecipe *Def, VPTypeAnalysis &TypeInfo) {
}
VPBuilder Builder(Def);
+
+ // Avoid replacing VPInstructions with underlying values with new
+ // VPInstructions. VPInstructions with underlying values should get
+ // widened/replicated later.
+ // TODO: We should also not replace non-VPInstructions like VPWidenRecipe with
+ // VPInstructions without underlying values, as those will get skipped during
+ // cost computation.
----------------
artagnon wrote:
```suggestion
// Avoid replacing VPInstructions with underlying values with new
// VPInstructions, as we would fail to create Widen-recipes from the new VPInstructions without an underlying value, and miss out on some Widen-only transformations later, by doing so.
// TODO: We should also not replace non-VPInstructions like VPWidenRecipe with
// VPInstructions without underlying values, as those will get skipped during
// cost computation.
```
I had a question: why can't we just set the underlying value of the newly created VPInstruction? What would be the effect of that?
https://github.com/llvm/llvm-project/pull/176828
More information about the llvm-commits
mailing list