[PATCH] D31169: [DAGCombiner] Initial support for the fast-math flag contract
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 29 15:20:41 PDT 2017
arsenm 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));
----------------
spatel wrote:
> If the target has FMAD, then did we just bail out unnecessarily?
Yes, the point of fmad is it is safe anyway
================
Comment at: test/CodeGen/AArch64/neon-fma-FMF.ll:13
+; CHECK-LABEL: no_fma_1:
+; CHECK-NOT: fmla
+ %tmp1 = fmul contract <2 x float> %A, %B;
----------------
Positive checks for the separate add and mul would be less fragile
https://reviews.llvm.org/D31169
More information about the llvm-commits
mailing list