[llvm] r235508 - Fixed logic to enable complex FMA formation.
Eric Christopher
echristo at gmail.com
Wed Apr 22 08:39:05 PDT 2015
That's cool. Would have saved some time had you put that in the commit
message. :)
-eric
On Wed, Apr 22, 2015, 8:32 AM Olivier Sallenave <ol.sall at gmail.com> wrote:
> Hi Eric,
>
> The change ensures that if (HasFMAD && LookThroughFPExt && !UnsafeFPMath)
> we do not perform transforms that alter the precision. To my knowledge
> there is no target for which (HasFMAD && LookThroughFPExt) would be true --
> this is a change for potential future targets. Is it fine not to have a
> testcase then?
>
> Thanks,
>
> Olivier
>
> 2015-04-22 10:20 GMT-04:00 Eric Christopher <echristo at gmail.com>:
>
> Test case? Also while it's fairly obvious what you did if you look at the
>> code a more verbose commit message is often helpful. Thanks!
>>
>> -eric
>>
>> On Wed, Apr 22, 2015, 7:13 AM Olivier Sallenave <ohsallen at us.ibm.com>
>> wrote:
>>
>>> Author: ohsallen
>>> Date: Wed Apr 22 09:07:26 2015
>>> New Revision: 235508
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=235508&view=rev
>>> Log:
>>> Fixed logic to enable complex FMA formation.
>>>
>>> Modified:
>>> llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
>>>
>>> Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=235508&r1=235507&r2=235508&view=diff
>>>
>>> ==============================================================================
>>> --- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
>>> +++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Wed Apr 22
>>> 09:07:26 2015
>>> @@ -7164,7 +7164,7 @@ SDValue DAGCombiner::visitFADDForFMAComb
>>> N0));
>>> }
>>>
>>> - if (LookThroughFPExt) {
>>> + if (UnsafeFPMath && LookThroughFPExt) {
>>> // fold (fadd (fma x, y, (fpext (fmul u, v))), z)
>>> // -> (fma x, y, (fma (fpext u), (fpext v), z))
>>> auto FoldFAddFMAFPExtFMul = [&] (
>>> @@ -7415,7 +7415,7 @@ SDValue DAGCombiner::visitFSUBForFMAComb
>>> N21, N0));
>>> }
>>>
>>> - if (LookThroughFPExt) {
>>> + if (UnsafeFPMath && LookThroughFPExt) {
>>> // fold (fsub (fma x, y, (fpext (fmul u, v))), z)
>>> // -> (fma x, y (fma (fpext u), (fpext v), (fneg z)))
>>> if (N0.getOpcode() == PreferredFusedOpcode) {
>>>
>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150422/54780f1e/attachment.html>
More information about the llvm-commits
mailing list