[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 Mar 10 12:22:03 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);
----------------
a.elovikov wrote:
> fhahn wrote:
> > 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).
> @fhahn, are there any plans to start using DivergenceAnalysis instead of SE for the purpose of checking the uniformity?
Not that I am aware of at the moment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97136/new/
https://reviews.llvm.org/D97136
More information about the llvm-commits
mailing list