[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
Wed Feb 24 07:18:56 PST 2021
fhahn added inline comments.
================
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);
----------------
Kazhuu wrote:
> fhahn wrote:
> > I think we should test all possible for loop invariant conditions (in inner & outer loop).
> Can you elaborate a bit what you mean? Like test that is the condition invariant for all inner and outer loops?
Currently the condition of the select in the inner loop is invariant (because it's a function argument). We should have tests with conditions that are invariant only in parts of the loop (e.g. a select with a condition that depends on inner & outer IVs in the inner loop, a select with a condition that depends on the outer IV in the inner loop).
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97136/new/
https://reviews.llvm.org/D97136
More information about the llvm-commits
mailing list