[PATCH] D31398: [X86][X86 intrinsics]Folding cmp(sub(a, b), 0) into cmp(a, b) optimization

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 10 20:05:39 PDT 2017


hfinkel added a comment.

In https://reviews.llvm.org/D31398#715307, @scanon wrote:

> `(x-y) == 0 --> x == y` does not require nsz (zeros of any sign compare equal), nor does it require nnan (if x or y is NaN, both comparisons are false). It *does* require ninf (because inf-inf = NaN), and it also requires that subnormals are not flushed by the CPU. There's been some churn around flushing recently, Hal may have thoughts (+Hal).


We still assume standard denormal handling. There's ongoing work to add intrinsics for operations that are sensitive to this behavior (and rounding modes, etc.), but that shouldn't affect this.


https://reviews.llvm.org/D31398





More information about the llvm-commits mailing list