[PATCH] D78430: [InstSimplify] fold and/or of compares with equality to min/max constant

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 22 01:03:14 PDT 2020


lebedev.ri added a comment.

In D78430#1995663 <https://reviews.llvm.org/D78430#1995663>, @spatel wrote:

> In D78430#1995462 <https://reviews.llvm.org/D78430#1995462>, @lebedev.ri wrote:
>
> > In D78430#1995421 <https://reviews.llvm.org/D78430#1995421>, @spatel wrote:
> >
> > > If there's agreement on that direction, I will abandon this patch.
> >
> >
> > but note that it would be a suspended, half-baked state,
> >  since then we'd neither generalize the existing folds,
> >  nor drop them.
>
>
> Yes, it's fragmented. We could still remove the existing chunks shown here if we think that instcombine is probably good enough.
>  We have to decide if the reduction in code is worthy.




In D78430#1995663 <https://reviews.llvm.org/D78430#1995663>, @spatel wrote:

> There's that pesky one-use check in the other patch though, so there's a slight chance that we would lose an optimization somewhere.
>  Alternatively, I can fix the remaining known bug here, and we'd have full optimization power with some overlap.


That is my worry & preferred solution, yes.


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

https://reviews.llvm.org/D78430





More information about the llvm-commits mailing list