llvm-6502/test/Transforms/InstCombine/fsub-fsub.ll
Dan Gohman e54aba5fa9 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
2009-06-12 19:23:25 +00:00

9 lines
240 B
LLVM

; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep fsub | count 2
; PR4374
define float @func(float %a, float %b) nounwind {
%tmp3 = fsub float %a, %b
%tmp4 = fsub float -0.000000e+00, %tmp3
ret float %tmp4
}