]> granicus.if.org Git - llvm/commit
Merging r227491:
authorHans Wennborg <hans@hanshq.net>
Fri, 30 Jan 2015 01:37:17 +0000 (01:37 +0000)
committerHans Wennborg <hans@hanshq.net>
Fri, 30 Jan 2015 01:37:17 +0000 (01:37 +0000)
commit76a77fb55982b0eacc2f721c7af84fb0e198d1ae
tree3f1a3c96fb7ef483c1e04bcf7926dad39b3133e5
parent65794dd75cf18267191908ab0ddc23349800a560
Merging r227491:
------------------------------------------------------------------------
r227491 | spatel | 2015-01-29 12:51:49 -0800 (Thu, 29 Jan 2015) | 13 lines

[GVN] don't propagate equality comparisons of FP zero (PR22376)

In http://reviews.llvm.org/D6911, we allowed GVN to propagate FP equalities
to allow some simple value range optimizations. But that introduced a bug
when comparing to -0.0 or 0.0: these compare equal even though they are not
bitwise identical.

This patch disallows propagating zero constants in equality comparisons.
Fixes: http://llvm.org/bugs/show_bug.cgi?id=22376
Differential Revision: http://reviews.llvm.org/D7257

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@227537 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/GVN.cpp
test/Transforms/GVN/edge.ll