[PATCH] D88447: [VPlan] Switch VPWidenRecipe to be a VPValue

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 15 10:40:31 PST 2020


dmgreen added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7912
           UseReductionIntrinsic);
+      if (VPValue* V = WidenRecipe->toVPValue()) {
+        V->replaceAllUsesWith(RedRecipe);
----------------
fhahn wrote:
> `WidenRecipe` is always guaranteed to be a `VPValue` here because it is either a VPWidenSelect or VPWiden recipe, right? I think it should be possible to call toVPValue unconditionally, or better just `cast<VPValue>(WidenRecipe)`, possible with a comment why it is safe?
Yeah this was written before VPWidenSelect went in.

This all relies on changing VPReductionRecipe first I think. As you can imagine, as these are already actually using VPValues, they become the most interrelated recipes to change.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88447/new/

https://reviews.llvm.org/D88447



More information about the llvm-commits mailing list