OSDN Git Service

Fix isNegatibleForFree to not return true for ConstantFP nodes
authorChris Lattner <sabre@nondot.org>
Tue, 26 Feb 2008 07:04:54 +0000 (07:04 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 26 Feb 2008 07:04:54 +0000 (07:04 +0000)
commit0254e7033a1d879357e582dcdc1943e656192768
tree239334a199905e3921187f7b1936da02a8940465
parent9bf12b5583104c810cfadcdce91edf9efad79973
Fix isNegatibleForFree to not return true for ConstantFP nodes
after legalize.  Just because a constant is legal (e.g. 0.0 in SSE)
doesn't mean that its negated value is legal (-0.0).  We could make
this stronger by checking to see if the negated constant is actually
legal post negation, but it doesn't seem like a big deal.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47591 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/Generic/2008-02-25-NegateZero.ll [new file with mode: 0644]