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

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 21 16:16:50 PDT 2020


spatel added a comment.

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. 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. We have to decide if the reduction in code is worthy. Alternatively, I can fix the remaining known bug here, and we'd have full optimization power with some overlap.


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

https://reviews.llvm.org/D78430





More information about the llvm-commits mailing list