[llvm-commits] [llvm] r73243 - in /llvm/trunk: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/fsub-fsub.ll

Dan Gohman gohman at apple.com
Fri Jun 12 13:52:16 PDT 2009


On Jun 12, 2009, at 1:35 PM, Dale Johannesen wrote:


>
> On Jun 12, 2009, at 12:23 PMPDT, Dan Gohman wrote:
>
>
>> Author: djg
>>
>> Date: Fri Jun 12 14:23:25 2009
>>
>> New Revision: 73243
>>
>>
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=73243&view=rev
>>
>> Log:
>>
>> Don't do (x - (y - z)) --> (x + (z - y)) on floating-point types,
>>
>> because
>>
>> it may round differently. This fixes PR4374.
>>
>
> Shouldn't we do this if UnsafeFPMath is on?

InstCombine doesn't currently know about UnsafeFPMath.

DAGCombine does know about it, and it already does this
transformation.

Dan




More information about the llvm-commits mailing list