[PATCH] D44367: [InstCombine] peek through FP casts for sign-bit compares (PR36682)

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 11 11:09:54 PDT 2018


spatel added a comment.

In https://reviews.llvm.org/D44367#1034194, @lebedev.ri wrote:

> In the mean time i experimented with generating the testcases (clearly, overdone it), and this patch does not handle all the cases i've come up with. Or maybe the cases are just invalid, which is more likely.


Nice. I thought about the X == 0 and X != 0 cases just after I posted this. I think those are safe to add in a small follow-up patch.

We should canonicalize other signbit-check predicates (sle / sge) to this form. Are you seeing any of those cases fail to match with this patch?


https://reviews.llvm.org/D44367





More information about the llvm-commits mailing list