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)
commit40eaa8df99982568bc71017e8a2e79242dbe0c5a
treec068b26a5d7adafc7c11551ba2e2070b886a4f6c
parentd9b8bd6b86add43cd9dde62674e8465adc8e911a
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.

llvm-svn: 230515
llvm/lib/Analysis/ValueTracking.cpp
llvm/test/Transforms/InstSimplify/floating-point-arithmetic.ll