[llvm] [LV] Support EVL for partial reduction and VPExpressionRecipe. (PR #205741)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 20 03:24:43 PDT 2026
================
@@ -3559,18 +3580,23 @@ VPExpressionRecipe::VPExpressionRecipe(
R->replaceUsesOfWith(LiveIn, Tmp);
}
-void VPExpressionRecipe::decompose() {
- for (auto *R : ExpressionRecipes)
+SmallVector<VPSingleDefRecipe *> VPExpressionRecipe::decompose() {
+ SmallVector<VPSingleDefRecipe *> InsertedRecipes;
+ for (auto *R : ExpressionRecipes) {
// Since the list could contain duplicates, make sure the recipe hasn't
// already been inserted.
- if (!R->getParent())
+ if (!R->getParent()) {
R->insertBefore(this);
+ InsertedRecipes.push_back(R);
----------------
fhahn wrote:
I am not sure this will work correctly as-is. If we have duplicates, then we will have to incorrect number of recieps when constructing the EVL VPExpressionRecipe.
e.g. something like
```
%e = sext i8 %l to i32
%mul = mul i32 %e, %e
%add = add i32 %sum, %mul
```
https://github.com/llvm/llvm-project/pull/205741
More information about the llvm-commits
mailing list