[LLVMdev] fmac generation for cortex-a9

Sebastien DELDON-GNB sebastien.deldon at st.com
Fri Nov 9 08:51:10 PST 2012


Hi Bastien,

Weird gcc is generating fma for my platform STEricsson Novathor with Linaro, code works. It also works when I use LLVM to generate fma (using llc -mtriple=armv7-eabi). Maybe someone from ARM can answer the question ?

Seb

From: JF Bastien [mailto:jfb at google.com]
Sent: Friday, November 09, 2012 5:36 PM
To: Sebastien DELDON-GNB
Cc: Anitha Boyapati; llvmdev at cs.uiuc.edu
Subject: Re: [LLVMdev] fmac generation for cortex-a9

AFAIK A9 doesn't have VFPv4 or AdvSIMDv2, so it doesn't have VFMA. I don't know what LLVM does, but it shouldn't emit VFMA when you target A9. VMLA isn't a fused multiply-add, it's a multiply followed by an add and has different latency as well as precision.

On Thu, Nov 8, 2012 at 4:57 AM, Sebastien DELDON-GNB <sebastien.deldon at st.com<mailto:sebastien.deldon at st.com>> wrote:
Hi Anitha,

Thanks for your answer but -mcpu=cortex-a9 -mattr=+vfp4 doesn' t enable fused mac generation for me.
I would like just to understand why -mtriple=armv7-eabi enables it while -mcpu=cortex-a9 seems to disable it ?

Seb

> -----Original Message-----
> From: Anitha Boyapati [mailto:anitha.boyapati at gmail.com<mailto:anitha.boyapati at gmail.com>]
> Sent: Thursday, November 08, 2012 10:22 AM
> To: Sebastien DELDON-GNB
> Cc: llvmdev at cs.uiuc.edu<mailto:llvmdev at cs.uiuc.edu>
> Subject: Re: [LLVMdev] fmac generation for cortex-a9
>
> On 8 November 2012 13:56, Sebastien DELDON-GNB
> <sebastien.deldon at st.com<mailto:sebastien.deldon at st.com>> wrote:
> > Hi all,
> >
> >
> >
> >
> >
> > I've a .ll code that use double precision fmul/fadd or fmul/fsub. When
> > I compile it using llc -mcpu=cortex-a9 I couldn't get vmla/vmls
> > generated even using -fp-contract=fast, but when I use option
> > -mtriple=armv7-eabi instead of -mcpu=cortex-a9 fused mac are
> generated. Can someone explain me why  ?
> >
>
> Perhaps you need to use some attributes. -mattr=+vfp4 Check fusedMAC.ll
> from ARM codegen tests.
>
>
> --
>  Anitha

_______________________________________________
LLVM Developers mailing list
LLVMdev at cs.uiuc.edu<mailto: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/20121109/2d8c302f/attachment.html>


More information about the llvm-dev mailing list