[PATCH] D139832: [IndVars] Support AND/OR in optimizeLoopExitWithUnknownExitCount
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 10 04:55:49 PST 2023
mkazantsev added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1480
+ NCI->setName(OldCond->getName() + ".first_iter");
+ NCI->moveBefore(cast<Instruction>(OldCond));
+ }
----------------
mkazantsev wrote:
> nikic wrote:
> > Should we be setting the insert point on Rewriter instead? Mainly wondering if we might generate multiple insts and this then only moves one of them.
> Interesting point, will check.
in short: `createInvariantCond` uses BI as expansion point for icmp and not rewriter's insertion point. I think this can be changed, but takes more than flick of fingers. Now much are you concerned? Can it go as follow-up?
We never generate more than 1 non-invariant instruction here as far as I can tell.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139832/new/
https://reviews.llvm.org/D139832
More information about the llvm-commits
mailing list