[PATCH] fix an invisible bug when combining repeated FP divisors

hfinkel at anl.gov hfinkel at anl.gov
Wed May 20 13:57:01 PDT 2015


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:8312
@@ -8311,3 +8311,3 @@
       SDValue FPOne = DAG.getConstantFP(1.0, DL, VT);
       SDValue Reciprocal = DAG.getNode(ISD::FDIV, DL, VT, FPOne, N1);
 
----------------
So once we have FMF, you'll add them here?

================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:8324
@@ -8321,1 +8323,3 @@
+          // same node as Reciprocal, but with FMF they may be different nodes.
+          CombineTo(U, Reciprocal);
         }
----------------
I'm not sure this is the right solution. Instead, we may want to check for a pre-existing reciprocal node, and use it if it already exists instead of replacing it with, perhaps, looser FMFs.

http://reviews.llvm.org/D9893

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






More information about the llvm-commits mailing list