[PATCH] D31169: [DAGCombiner] Initial support for the fast-math flag contract

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 29 15:23:15 PDT 2017


spatel added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:8721-8725
+  if (!isContractable(N))
+    return SDValue();
 
   // Floating-point multiply-add with intermediate rounding.
   bool HasFMAD = (LegalOperations && TLI.isOperationLegal(ISD::FMAD, VT));
----------------
arsenm wrote:
> spatel wrote:
> > If the target has FMAD, then did we just bail out unnecessarily?
> Yes, the point of fmad is it is safe anyway
Yikes...this means there are no regression tests for any of the folds in this function for an FMAD-capable target?


https://reviews.llvm.org/D31169





More information about the llvm-commits mailing list