[PATCH] D104075: [ScalarEvolution] Merge howManyGreaterThans with howManyLessThans.
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 8 17:24:10 PDT 2021
efriedma added inline comments.
================
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;
----------------
reames wrote:
> 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.
There's actually another layer of complexity here on the main branch: if LHS/RHS are pointers, we have ptrtoint expressions floating around here, which isLoopEntryGuardedByCond also doesn't handle well.
After D105510 is merged, I can try messing with isLoopEntryGuardedByCond etc.
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