public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Alexandre Oliva <oliva@adacore.com>
To: gcc-patches@gcc.gnu.org
Subject: use -mfpu=neon for arm/simd/vmmla_1.c
Date: Tue, 05 Jan 2021 04:48:33 -0300	[thread overview]
Message-ID: <orble37rji.fsf@lxoliva.fsfla.org> (raw)


On some of our arm targets, we get various -mfpu flags implicitly or
explicitly passed to the compiler during test runs.  The target
options pushed in arm_neon.h that affect vmmlaq_s32 set isa_bit_neon,
but the caller doesn't have that bit set, so arm_can_inline_p rejects
the attempt to inline it, and the test fails.

An explicit -mfpu=neon would address the compile problem, but cause
the assembler to reject the generated code.

So this patch adds -mfpu=auto to the test, overriding any implicit
flags with the fpu implied by the arch.

Regstrapped on x86_64-linux-gnu, also tested on x-arm-wrs-vxworks7r2.
Ok to install?


for  gcc/testsuite/ChangeLog

	* gcc.target/arm/simd/vmmla_1.c: Pass -mfpu=auto.
---
 gcc/testsuite/gcc.target/arm/simd/vmmla_1.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.target/arm/simd/vmmla_1.c b/gcc/testsuite/gcc.target/arm/simd/vmmla_1.c
index aeb4a359e3351..d33ebf361d436 100644
--- a/gcc/testsuite/gcc.target/arm/simd/vmmla_1.c
+++ b/gcc/testsuite/gcc.target/arm/simd/vmmla_1.c
@@ -1,6 +1,6 @@
 /* { dg-do assemble } */
 /* { dg-require-effective-target arm_v8_2a_i8mm_ok } */
-/* { dg-options "-save-temps -O2 -march=armv8.2-a+i8mm -mfloat-abi=hard" } */
+/* { dg-options "-save-temps -O2 -march=armv8.2-a+i8mm -mfpu=auto -mfloat-abi=hard" } */
 
 #include "arm_neon.h"
 

-- 
Alexandre Oliva, happy hacker  https://FSFLA.org/blogs/lxo/
   Free Software Activist         GNU Toolchain Engineer
        Vim, Vi, Voltei pro Emacs -- GNUlius Caesar

             reply	other threads:[~2021-01-05  7:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-05  7:48 Alexandre Oliva [this message]
2021-01-13 17:41 ` Alexandre Oliva
2021-02-05 22:15   ` use -mfpu=auto for arm/simd/vmmla_1.c (was: use -mfpu=neon for arm/simd/vmmla_1.c) Alexandre Oliva
2021-02-09 15:42 ` use -mfpu=neon for arm/simd/vmmla_1.c Kyrylo Tkachov
2021-02-11  5:19   ` Alexandre Oliva

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=orble37rji.fsf@lxoliva.fsfla.org \
    --to=oliva@adacore.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).