[PATCH] D141994: [IndVars] Expand icmp in preheader rather than in loop
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 18 03:21:09 PST 2023
mkazantsev added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1370
IRBuilder<> Builder(BI);
+ if (L->isLoopInvariant(LHSV) && L->isLoopInvariant(RHSV)) {
+ BasicBlock *Preheader = L->getLoopPreheader();
----------------
I guess you can assert these facts. `LIP` is supposed to produce loop-invariant SCEVs and expander, I guess, should always be able to expand it in preheader. Isn't it so?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141994/new/
https://reviews.llvm.org/D141994
More information about the llvm-commits
mailing list