[LLVMdev] Best way for JIT to query whether llvm.fma.* is fast?

Lang Hames lhames at gmail.com
Fri Dec 12 09:15:57 PST 2014


Hi Arch,

Also, consider just emitting the llvm.fmuladd intrinsic instead of
llvm.fma. fmuladd is lowered to llvm.fma in codegen if the optimizer
determines that it's beneficial, otherwise it is expanded to a mul and an
add.

At the moment I think SelectionDAG is just checking isFMAFasterThanFMulAndFAdd
anyway, but that condition could be refined in the future.

Cheers,
Lang.


On Wed, Dec 10, 2014 at 1:17 PM, Robison, Arch <arch.robison at intel.com>
wrote:

>  Thanks!  That’s probably close enough for practical purposes.  I looked
> at the overrides on various targets, and they all return true if the FMA
> hardware exists.
>
>
>
> - Arch
>
>
>
> *From:* Jingyue Wu [mailto:jingyue at google.com]
> *Sent:* Wednesday, December 10, 2014 2:56 PM
> *To:* Robison, Arch
> *Cc:* llvmdev at cs.uiuc.edu
> *Subject:* Re: [LLVMdev] Best way for JIT to query whether llvm.fma.* is
> fast?
>
>
>
> Does TargetLowering::isFMAFasterThanFMulAndFAdd (
> http://llvm.org/docs/doxygen/html/TargetLowering_8h_source.html#l01499)
> help?
>
>
>
> Jingyue
>
>
>
> On Wed, Dec 10, 2014 at 12:48 PM, Robison, Arch <arch.robison at intel.com>
> wrote:
>
>  For the Julia language JIT, we’d like be able to tell whether the
> llvm.fma.* intrinsic has hardware support.  What’s the best way to  query
> LLVM (JIT) for this information?
>
>
>
> The information would be used in situations where the user wants to use
> different algorithms depending on whether FMA hardware is present or not.
>
>
>
> - Arch D. Robison
>
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
>
> _______________________________________________
> 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/20141212/689d6197/attachment.html>


More information about the llvm-dev mailing list