Fix really obscure bug in CannotBeNegativeZero() (PR22688)
authorSanjay Patel <spatel@rotateright.com>
Wed, 25 Feb 2015 18:00:15 +0000 (18:00 +0000)
committerSanjay Patel <spatel@rotateright.com>
Wed, 25 Feb 2015 18:00:15 +0000 (18:00 +0000)
commitd2c64e2df97af80d36a40eff0f844fe8e14600bd
tree5ddca941c280547c4f9749818ff53f129a52530c
parent4454339f09a482af6fd07b25d6b06443996dd703
Fix really obscure bug in CannotBeNegativeZero() (PR22688)

With a diabolically crafted test case, we could recurse
through this code and return true instead of false.

The larger engineering crime is the use of magic numbers.
Added FIXME comments for those.

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