<p dir="ltr">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!</p>
<p dir="ltr">-eric</p>
<br><div class="gmail_quote">On Wed, Apr 22, 2015, 7:13 AM Olivier Sallenave <<a href="mailto:ohsallen@us.ibm.com">ohsallen@us.ibm.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: ohsallen<br>
Date: Wed Apr 22 09:07:26 2015<br>
New Revision: 235508<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=235508&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=235508&view=rev</a><br>
Log:<br>
Fixed logic to enable complex FMA formation.<br>
<br>
Modified:<br>
    llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp<br>
<br>
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=235508&r1=235507&r2=235508&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=235508&r1=235507&r2=235508&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Wed Apr 22 09:07:26 2015<br>
@@ -7164,7 +7164,7 @@ SDValue DAGCombiner::visitFADDForFMAComb<br>
                                      N0));<br>
     }<br>
<br>
-    if (LookThroughFPExt) {<br>
+    if (UnsafeFPMath && LookThroughFPExt) {<br>
       // fold (fadd (fma x, y, (fpext (fmul u, v))), z)<br>
       //   -> (fma x, y, (fma (fpext u), (fpext v), z))<br>
       auto FoldFAddFMAFPExtFMul = [&] (<br>
@@ -7415,7 +7415,7 @@ SDValue DAGCombiner::visitFSUBForFMAComb<br>
                                      N21, N0));<br>
     }<br>
<br>
-    if (LookThroughFPExt) {<br>
+    if (UnsafeFPMath && LookThroughFPExt) {<br>
       // fold (fsub (fma x, y, (fpext (fmul u, v))), z)<br>
       //   -> (fma x, y (fma (fpext u), (fpext v), (fneg z)))<br>
       if (N0.getOpcode() == PreferredFusedOpcode) {<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>