[PATCH] D42879: InstCombine: 1./x >= 0. -> x >= 0.

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 6 16:12:27 PST 2018


MatzeB added a comment.

In https://reviews.llvm.org/D42879#999811, @scanon wrote:

> Underflow or overflow doesn't change sign, so 0 < C < inf && X >= 0 --> C/X >= 0.


It doesn't change sign, but have to differentiate between three cases here: negative, null (or minus), and positive.

Underflow can change a value from positive or negative to null.
My understanding is that in case of underflow of large positive X the expression `C/X <= 0` may be true while `X <= 0` is not.


Repository:
  rL LLVM

https://reviews.llvm.org/D42879





More information about the llvm-commits mailing list