[PATCH] D147355: [LV] Optimize trip count SCEV.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 12 10:42:38 PDT 2023
craig.topper added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:1005
+ SE.getAddExpr(BackedgeTakenCount,
+ SE.getOne(BackedgeTakenCount->getType()), SCEV::FlagNUW),
+ IdxTy);
----------------
reames wrote:
> I don't believe the flags usage here is correct. There's a single SCEV node for an add with given operands. The flags must be correct for all users of that add expression, and for a loop invariant trip count there's nothing preventing another use outside the loop which does overflow.
Is the usage in LoopIdiomRecognize wrong too?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147355/new/
https://reviews.llvm.org/D147355
More information about the llvm-commits
mailing list