isKnownNonEqual(A, B) returns true if it can be determined that A != B.
At the moment it only knows one fact, that a non-wrapping add of nonzero to a value cannot be that value:
A + B != A [where B != 0, addition is nsw or nuw]
jmolloy on Sep 11 2015, 5:55 AM.Authored by
I like the idea of this function, but I'm somewhat nervous of adding such a generic facility with such a limited implementation. It would make me feel much better if it also had the following check: call computeKnownBits on V1 and V2, and return true if any of the bits known to be 1 in one value are known to be zero in the other. That would naturally leverage much more of the existing infrastructure.
Also, I assume you're planning on soon using this somewhere?
Hi Hal, Sanjoy,
Thanks for the review. I've addressed both your comments, and:
Some minor comments inline.