diff mbox

[Committed] Fix gcc.target/aarch64/_Float16_*.c when supplied a -mcpu= option

Message ID CA+=Sn1=NqbWVyZ6QWdx299UR2ZnBRN9=MjQf2mVuLOpMT9NM7Q@mail.gmail.com
State New
Headers show

Commit Message

Andrew Pinski Aug. 6, 2017, 5:46 p.m. UTC
Hi,
 The gcc.target/aarch64/_Float16_*.c tests fail if we are testing with
-mcpu= option which is not an armv8.2-a processor.  This is because
independent of the order -mcpu=/-march= options, -mcpu= overrides the
-march= option.

Committed as obvious after testing on aarch64-linux-gnu with
"--target_board=unix/\{,-mcpu=thunderx,-mcpu=thunderx2t99,-march=armv8-a,-march=armv8.1-a,-march=armv8.2-a\}".

Thanks,
Andrew Pinski

ChangeLog:
* gcc.target/aarch64/_Float16_1.c: Skip if supplied a -mcpu= option.
* gcc.target/aarch64/_Float16_2.c: Likewise
* gcc.target/aarch64/_Float16_3.c: Likewise.
diff mbox

Patch

Index: testsuite/gcc.target/aarch64/_Float16_1.c
===================================================================
--- testsuite/gcc.target/aarch64/_Float16_1.c	(revision 250901)
+++ testsuite/gcc.target/aarch64/_Float16_1.c	(working copy)
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O3 -march=armv8.2-a+nofp16" } */
+/* { dg-skip-if "" { *-*-* } { "-mcpu=*" } { "" } } */
 
 #pragma GCC target ("arch=armv8.2-a+nofp16")
 
Index: testsuite/gcc.target/aarch64/_Float16_2.c
===================================================================
--- testsuite/gcc.target/aarch64/_Float16_2.c	(revision 250901)
+++ testsuite/gcc.target/aarch64/_Float16_2.c	(working copy)
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O3 -march=armv8.2-a+nofp16 -fpermitted-flt-eval-methods=c11" } */
+/* { dg-skip-if "" { *-*-* } { "-mcpu=*" } { "" } } */
 
 #pragma GCC target ("arch=armv8.2-a+nofp16")
 
Index: testsuite/gcc.target/aarch64/_Float16_3.c
===================================================================
--- testsuite/gcc.target/aarch64/_Float16_3.c	(revision 250901)
+++ testsuite/gcc.target/aarch64/_Float16_3.c	(working copy)
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O3 -march=armv8.2-a+nofp16 -std=c11 -ffp-contract=fast" } */
+/* { dg-skip-if "" { *-*-* } { "-mcpu=*" } { "" } } */
 
 #pragma GCC target ("arch=armv8.2-a+nofp16")