[PATCH] D148841: [LV] Use SCEV for uniformity analysis across VF
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 25 14:23:09 PDT 2023
fhahn marked 2 inline comments as done.
fhahn added inline comments.
================
Comment at: llvm/lib/Analysis/LoopAccessAnalysis.cpp:2570
+ // Build a new AddRec by multiplying the step by StepMultiplier and adding
+ // Offset * Step to the resulting AddRec.
+ auto *Ty = Expr->getType();
----------------
nikic wrote:
> Assert that the addrec loop is correct?
Yep that's safer, added the assert. Should help due to the invariance check in ::visit().
================
Comment at: llvm/lib/Analysis/LoopAccessAnalysis.cpp:2577
+ SE.getMulExpr(StepC, Expr->getStepRecurrence(SE)),
+ Expr->getLoop(), Expr->getNoWrapFlags()),
+ SE.getMulExpr(OffsetC, Expr->getStepRecurrence(SE)));
----------------
nikic wrote:
> Why is it valid to preserve nowrap flags here?
It should be valid for the vector loop, as we check that the vector induction doesn't overflow/wrap; although the loop we are dealing with here is still the original scalar loop... But it's not needed so I removed it, thanks!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148841/new/
https://reviews.llvm.org/D148841
More information about the llvm-commits
mailing list