[PATCH] InstCombine: simplify signed range checks

Erik Eckstein eeckstein at apple.com
Wed Nov 26 07:34:04 PST 2014


This is already the second version of the patch. The first version was discussed by email.

The main difference to the first version is that I added support for the inverted case: icmp | icmp (in addition to icmp & icmp).

My comments to the original email from Philip:

> Is there a reason you're only handling the upper bound phrased as a sgt/sge?  Do we canonicalize away the alternate slt/sle formation?

Yes, but as I'm now also handling the inverted case, I have to deal with all the possibilities anyway.

> This doesn't need to be a member function does it?  A static function would be preferred.

It's a member function because it uses the DL, AT and DT members.

http://reviews.llvm.org/D6422






More information about the llvm-commits mailing list