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

Adam Nemet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 29 15:45:39 PDT 2017


anemet 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));
----------------
anemet wrote:
> spatel wrote:
> > 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?
> Good point.  Let me do some digging.
Looks like there is: CodeGen/R600/mad-combine.ll.  I just didn't help that target enabled :(.  Thanks for catching this!


https://reviews.llvm.org/D31169





More information about the llvm-commits mailing list