[llvm] [LV] Keep duplicate recipes in VPExpressionRecipe (PR #156976)
Sam Tebbs via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 19 02:28:03 PDT 2025
SamTebbs33 wrote:
> Hmm, this only impacts printing, right? It seems like it would be simpler to just handle the case where 1 extend is shared when picking the multiply recipe, by checking if `ExpressionRecipes[1]` is an extend or widen recipe?
>
> ```
> auto *Mul = cast<VPWidenRecipe>(IsExtended ? ExpressionRecipes[2]
> : ExpressionRecipes[0]);
> ```
I think it's best to get the vector of recipes correct from the start so that we don't need to account for unexpectedness in other places. This could theoretically happen for future bundle types too and we don't want lots of checks when we can just get it right from the start of the bundle's existence.
https://github.com/llvm/llvm-project/pull/156976
More information about the llvm-commits
mailing list