[PATCH] D111066: Disable "[SCEV] Prove implications of different type via truncation"

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 8 07:28:07 PDT 2021


bjope added inline comments.


================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:10666
           getConstant(APInt::getMaxValue(BitWidth)), WideType);
       if (isKnownPredicate(ICmpInst::ICMP_ULE, FoundLHS, MaxValue) &&
           isKnownPredicate(ICmpInst::ICMP_ULE, FoundRHS, MaxValue)) {
----------------
I tried changing the order of this if statement and the nestled if-statement. I.e. doing the isImpliedCondBalancedTypes check first, then it will converge faster. Well at least for the reproducer.

No idea if it is more common that the isKnownPredicate checks will be true more often that the isImpliedCondBalancedTypes check. One reasoning could be that it perhaps converge faster since doing the new lookup on the truncated expressions is changing the state a bit more compared to just calling isKnownPredicate on the current state. But I have no idea really. Maybe one could gather some statistics for this based on some test suite.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111066



More information about the llvm-commits mailing list