[PATCH] D78582: [InstCombine] substitute equivalent constant to reduce logic-of-icmps

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


spatel added a comment.

In D78582#1995474 <https://reviews.llvm.org/D78582#1995474>, @nikic wrote:

> I like this approach. I guess the main thing we lose over the more limited handling in InstSimplify is the multi-use case?


Yes, the 1-use check is the only loss that I know of vs. what's in InstSimplify currently. 
Also, D78430 <https://reviews.llvm.org/D78430> has matching for:
(X == MAX) || (X >= Y) --> X >= Y
...and related patterns, and that is not handled here.
It's generally a gray area as to how to divide this kind of functionality, but we could do both if we want to be sure that nothing falls through the cracks.


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

https://reviews.llvm.org/D78582





More information about the llvm-commits mailing list