[PATCH] Refactor and enhance FMA combine

hfinkel at anl.gov hfinkel at anl.gov
Tue Mar 3 19:11:20 PST 2015


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:6944
@@ -6943,2 +6943,3 @@
                                        bool Aggressive,
+                                       bool ArrangeFPExt,
                                        SDNode *N,
----------------
Also, I don't find 'ArrangeFPExt' an informative name. Why not just name it LookThroughFPExt?



================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:7479
@@ -7209,3 +7478,3 @@
     // used.
-    if (SDValue Fused = performFaddFmulCombines(ISD::FMAD, true, N, TLI, DAG))
+    if (SDValue Fused = performFaddFmulCombines(ISD::FMAD, true, false, N, TLI, DAG))
       return Fused;
----------------
Please add a comment here explaining that we can't look through FPExt nodes, and thus that parameter is false, because doing so effectively introduces extra precision that would be invalid for FMAD.

http://reviews.llvm.org/D8050

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list