]> granicus.if.org Git - llvm/commit
[ValueTracking] Implement SignBitMustBeZero correctly for sqrt.
authorJustin Lebar <jlebar@google.com>
Thu, 26 Jan 2017 00:10:26 +0000 (00:10 +0000)
committerJustin Lebar <jlebar@google.com>
Thu, 26 Jan 2017 00:10:26 +0000 (00:10 +0000)
commit34292bd5acc16f572148365e3b599434f18fc782
treec65f6940a348cb1c3f0817d188ec9840f9c19909
parented1f855fb08e66ebb88a09ca115f779bf3c4fc53
[ValueTracking] Implement SignBitMustBeZero correctly for sqrt.

Summary:
Previously we assumed that the result of sqrt(x) always had 0 as its
sign bit.  But sqrt(-0) == -0.

Reviewers: hfinkel, efriedma, sanjoy

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D28928

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293115 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ValueTracking.cpp
test/Transforms/InstSimplify/floating-point-arithmetic.ll