[PATCH] D126502: [SCEV] Apply conditions involving constants first in applyLoopGuards.

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 30 03:56:47 PDT 2022


nikic added inline comments.


================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:14563
+    bool IsRangeB = CmpB->getPredicate() != CmpInst::ICMP_NE &&
+                    CmpB->getPredicate() != CmpInst::ICMP_EQ;
+    return IsRangeA < IsRangeB;
----------------
There may be range comparisons using eq/ne as well, with `!= 0` probably being the only important one. Possibly we should not be collecting Terms but already classified conditions (i.e. either known factor or known range limit)?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126502



More information about the llvm-commits mailing list