[PATCH] D31164: [IR] Add AllowContract to FastMathFlags
Mehdi AMINI via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 20 21:10:51 PDT 2017
mehdi_amini added inline comments.
Comment at: docs/LangRef.rst:2199
+ Allow floating-point contraction (e.g. fusing a multiply followed by an
+ addition into a fused multiply-and-add).
> mehdi_amini wrote:
> > Is it the intent to allow this as well : x + x + x -> 3 * x ?
> I don't think so. We do the general case (any number of terms) under unsafe-math, in FAddCombine::simplify in InstCombine.
I know we do this under unsafe-fp-math, I was wondering specifically about how fat the "contract" mode allows to go.
More information about the llvm-commits