[PATCH] D104075: [ScalarEvolution] Merge howManyGreaterThans with howManyLessThans.
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 8 16:41:53 PDT 2021
reames added inline comments.
================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:11401
+ RHS = getNotSCEV(RHS);
+ }
+
----------------
For sanity sake, please actually set Pred here so that if we use it below, we get what we expect.
================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:11530
+ // isLoopEntryGuardedByCond isn't very powerful, so we want to look for
+ // more likely patterns.
const SCEV *BECount;
----------------
I'd prefer to make it more powerful if possible.
A couple ideas, not sure if these work out or not:
* Use SimplifyICmpOperands to canonicalize operands to isBasicBlockEntryGuardedByCond.
* Teach isLoopEntryGuardedByCond to undo your not(lhs/rhs) transform.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104075/new/
https://reviews.llvm.org/D104075
More information about the llvm-commits
mailing list