[LLVMdev] Question about FMA formation

Michael Ilseman milseman at apple.com
Wed Dec 12 16:11:29 PST 2012


On Dec 12, 2012, at 3:40 PM, Shuxin Yang <shuxin.llvm at gmail.com> wrote:

> Hi, Dear All:
> 
>   I'm going implement FMA formation. On some architectures, "FMA a, b, c" is more precise than
> "a * b + c".  I'm wondering if FMA could be less precise. In the former case, can we enable FMA
> formation despite restrictive FP mode?
> 

I believe that a pass to form fmuladd[1] intrinsic calls would be very useful! The fmuladd intrinsic is defined such that its formation should be isolated from worries about strictness. It simply means "a * b + c" and leaves the decision of whether or not to fuse up to the code generator. Of course, one probably would only run your pass if they wanted the code generator to fuse it, but the pass itself should be valid. 

Someone please correct me if I misunderstand this intrinsic. 

[1] http://llvm.org/docs/LangRef.html#llvm-fmuladd-intrinsic

> Thanks
> Shuxin
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121212/c2f17cbe/attachment.html>


More information about the llvm-dev mailing list