[PATCH] D104140: [SCEV] Allow negative steps for LT exit count computation

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 19 16:03:37 PDT 2021


efriedma added inline comments.


================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:11630
     // Precondition a) implies that if the stride is negative, this is a single
     // trip loop. The backedge taken count formula reduces to zero in this case.
     //
----------------
I think this needs to be "if the stride is negative and rhs is invariant".


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

https://reviews.llvm.org/D104140



More information about the llvm-commits mailing list