[llvm-dev] NEON FP flags
Hal Finkel via llvm-dev
llvm-dev at lists.llvm.org
Thu Mar 24 21:11:20 PDT 2016
Hi Renato,
As I understand it, the fundamental property being addresses here is: Are the semantics of scalar FP math the same as vector FP math? TTI seems like a good place to expose that information. If the semantics are indeed different, then the vectorizer would require fast-math flags in order to vectorize FP operations (similarly, gcc's man page says it requires -funsafe-math-optimizations for vectorization unless -mfpu=neon or similar is specified). In this context, this different-semantics query would return true if:
!(isDarwin OR ARMISA >= v8 OR fpMath == NEON)
and then we need to teach people to use -mfpu=neon ;)
I think this more-or-less matches what you've proposed. Is that right?
-Hal
P.S. Looking at gcc's man page, gcc seems to use -mfpu for ARM and -mfpmath for x86. Do we use -mfpmath for both?
----- Original Message -----
> From: "Renato Golin" <renato.golin at linaro.org>
> To: "James Molloy" <James.Molloy at arm.com>
> Cc: "Hal Finkel" <hfinkel at anl.gov>, "LLVM Dev" <llvm-dev at lists.llvm.org>
> Sent: Tuesday, March 22, 2016 6:50:40 AM
> Subject: Re: NEON FP flags
>
> On 22 March 2016 at 11:34, James Molloy <James.Molloy at arm.com> wrote:
> > I don’t think this part is right. The denormal flag would have to
> > be set by
> > whatever code generates the FP instruction, which would be Clang’s
> > codegen
> > layer. So the if (Darwin) would be there, not in TTI.
>
> Right, I meant the information to set/not set would be in TTI, not
> the
> actual setting.
>
> I don't want Clang to have that kind of information independent of
> LLVM.
>
> cheers,
> --renato
>
--
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory
More information about the llvm-dev
mailing list