[PATCH] D139832: [IndVars] Support AND/OR in optimizeLoopExitWithUnknownExitCount
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 10 03:51:48 PST 2023
mkazantsev added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1464
+ // Avoid instruction duplication.
+ if (isa<Instruction>(Curr) && !Curr->hasOneUse())
+ return false;
----------------
mkazantsev wrote:
> nikic wrote:
> > I don't think we need to check `isa<Instruction>(Curr) &&` here (I guess you could have a constant expression icmp or something, but the whole transform doesn't make sense for that case).
> Method parameter with one use?
i.e. with more than one use.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139832/new/
https://reviews.llvm.org/D139832
More information about the llvm-commits
mailing list