OSDN Git Service

Don't do (x - (y - z)) --> (x + (z - y)) on floating-point types, because
authorDan Gohman <gohman@apple.com>
Fri, 12 Jun 2009 19:23:25 +0000 (19:23 +0000)
committerDan Gohman <gohman@apple.com>
Fri, 12 Jun 2009 19:23:25 +0000 (19:23 +0000)
commite54aba5fa959a6196c1d50fe9c229836ec59039e
tree12672f1d11345566278f95672abf79ff5df201c5
parent194ae785e1f94619cbdcdcf2921caa6997277d32
Don't do (x - (y - z)) --> (x + (z - y)) on floating-point types, because
it may round differently. This fixes PR4374.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73243 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/InstructionCombining.cpp
test/Transforms/InstCombine/fsub-fsub.ll [new file with mode: 0644]