[LLVMdev] FPOpFusion = Fast and Multiply-and-add combines

Samuel F Antao sfantao at us.ibm.com
Wed Jul 30 14:37:33 PDT 2014


Hi all,

The AllowFPOpFusion option passed to a target can currently take 3
different values, Fast, Standard or Strict (TargetOptions.h), being
Standard the default.

In the DAGCombiner, during the combination of mul and add/subtract into
multiply-and-add/subtract, this option is expected to be Fast in order to
enable the combine. This means, that by default no multiply-and-add opcodes
are going to be generated. If I understand it correctly, this is
undesirable given that multiply-and-add for targets like PPC (I am not sure
about all the other targets) does not pose any rounding problem and it can
even be more accurate than performing the two operations separately.

Also, in TargetOptions.h I read:

Standard, // Only allow fusion of 'blessed' ops (currently just fmuladd)

which made me suspect that the check against Fast in the DAGCombiner is not
correct.

I was wondering if this is something to be fixed in the DAG combiner or if
the target should set a different option to be checked by the DAGCombiner
saying that mul-add/subtract is okay.

Any comments?

Thanks in advance!
Samuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140730/14792424/attachment.html>


More information about the llvm-dev mailing list