[PATCH] D97136: [VPlan] Support to widen select intructions in VPlan native path

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 23 08:07:00 PST 2021


fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp:20
 void VPlanTransforms::VPInstructionsToVPRecipes(
-    Loop *OrigLoop, VPlanPtr &Plan,
+    PredicatedScalarEvolution &PSE, Loop *OrigLoop, VPlanPtr &Plan,
     LoopVectorizationLegality::InductionList &Inductions,
----------------
We only need `SE`, can you pass that directly?


================
Comment at: llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp:75
+        } else if (SelectInst *SI = dyn_cast<SelectInst>(Inst)) {
+          bool InvariantCond = PSE.getSE()->isLoopInvariant(
+              PSE.getSCEV(SI->getOperand(0)), OrigLoop);
----------------
I think we should test all possible for loop invariant conditions (in inner & outer loop).


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

https://reviews.llvm.org/D97136



More information about the llvm-commits mailing list