The 11/17/2017 22:06, James Greenhalgh wrote:
> On Tue, Nov 14, 2017 at 03:54:56PM +0000, Tamar Christina wrote:
> > Hi All,
> > 
> > Dot Product is intended to only be available for Armv8.2-a and newer.
> > While this restriction is reflected in the intrinsics, the patterns
> > themselves were missing the Armv8.2-a bit.
> > 
> > This means that using -march=armv8.1-a+dotprod incorrectly got the
> > auto-vectorizer to generate dot product instructions.
> > 
> > Regtested on aarch64-none-elf and no issues.
> > 
> > Ok for trunk?
> 
> What is the design here? That -march=armv8.1-a+dotprod is valid, but that
> the +dotprod is silently ignored? Is that really less surprising than
> a hard error?

As far as I am aware, AArch64 unlike ARM does not provide a facility to reject 
invalid combinations
of architecture and extensions. The argument parsers don't specify any 
relationship between
architectures and extensions. This is why -march=armv8-a+fp16 is also accepted 
silently.

This patch merely makes it not generate code that can't possibly run. 

> 
> How does this interact with -march=native ? If I remember right, we don't
> get any good indication from the kernel that we are Armv8.2-A rather than
> Armv8.1-A? Maybe I'm misremembering.

As far as I am aware, if you have a kernel which has asimddp support, and you 
compile with
-march=armv8.1-a then it's equivalent to specifying -march=armv8.1-a+dotprod, 
as in, the bit will
be enabled, but the feature won't, as it's gated on Armv8.2-a (with this patch).

> 
> Thanks,
> James
> 
> > 
> > Thanks,
> > Tamar
> > 
> > gcc/
> > 2017-11-14  Tamar Christina  <tamar.christ...@arm.com>
> > 
> >     * config/aarch64/aarch64.h (TARGET_DOTPROD): Add AARCH64_ISA_V8_2.
> > 
> > gcc/testsuite/
> > 2017-11-14  Tamar Christina  <tamar.christ...@arm.com>
> > 
> >     * gcc.target/aarch64/advsimd-intrinsics/vect-dot-s8_1.c: New.
> >     * gcc.target/aarch64/advsimd-intrinsics/vect-dot-s8_2.c: New.

-- 

Reply via email to