[PATCH] D87890: [SCEV] Handle `less` predicates for FoundPred = NE

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 22 02:28:19 PDT 2020


fhahn added a comment.

In D87890#2287035 <https://reviews.llvm.org/D87890#2287035>, @mkazantsev wrote:

> It seems that there is no way that SCEV can now both make this query and return true for it. I'm currently building a chain of patch that will fix the query responds. Hopefully with them we will be able to construct a test for it.
>
> Or can we just merge it basing on obviousness of this logic?

Sure that is fine, if there will be patches to make use of it in the near future.

LGTM, thanks.



================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:9725
+
+        // `LHS < RHS` is handled in the same way as `RHS > LHS`.
+        case ICmpInst::ICMP_SLE:
----------------
nit: Might be good to mention both the LE & LT variants and say that both `LHS <= RHS` and `LHS < RHS` are handled in the same way as `RHS >= LHS` and `RHS > LHS` respectively.


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

https://reviews.llvm.org/D87890



More information about the llvm-commits mailing list