[PATCH] D63733: [IndVars] Use exit count reasoning to discharge obviously untaken exits

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 25 10:35:30 PDT 2019


reames marked an inline comment as done.
reames added inline comments.


================
Comment at: lib/Transforms/Scalar/IndVarSimplify.cpp:2734
+         SE->isLoopEntryGuardedByCond(L, CmpInst::ICMP_ULT,
+                                      MaxExitCount, ExitCount))) {
+      auto *BI = cast<BranchInst>(ExitingBB->getTerminator());
----------------
nikic wrote:
> Some kind of copy and paste mistake? The second clause of the `||` fully subsumes the last.
Yep, that should have been the backedge case.  Good catch.

Now you see why I asked for ideas on how to test that case.  :)


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63733/new/

https://reviews.llvm.org/D63733





More information about the llvm-commits mailing list