[PATCH] D67332: [InstSimplify] simplifyUnsignedRangeCheck(): if we know that X != 0, handle more cases (PR43246)

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 8 13:42:28 PDT 2019


spatel added a comment.

In D67332#1662491 <https://reviews.llvm.org/D67332#1662491>, @lebedev.ri wrote:

> In D67332#1662486 <https://reviews.llvm.org/D67332#1662486>, @spatel wrote:
>
> > Sorry - I just looked over the comments in:
> >  https://bugs.llvm.org/show_bug.cgi?id=43246
> >
> > Does this allow removing a more specific (offset is constant) blob of code from instcombine?
>
>
> Can you please point me to it?
>  I suspect we get it via multiple folds that happen because
>  those instructions have no extra uses and constant on RHS.


That was just a guess on my part, but I tried a couple of examples, and I think you're right. If the offset is constant, we'll adjust the predicate and/or constant value and end up simplifying right above the clause you're adding.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D67332





More information about the llvm-commits mailing list