public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [testsuite] skip ARM neon-fp16 tests for other -mcpu values
@ 2011-06-08  1:29 Janis Johnson
  2011-06-08  2:05 ` Mike Stump
  2011-06-08 10:24 ` Joseph S. Myers
  0 siblings, 2 replies; 10+ messages in thread
From: Janis Johnson @ 2011-06-08  1:29 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 789 bytes --]

These tests fail when multilib options use -mfpu=xxxx and override the
-mfpu=neon-fp16 used for the test:

  g++.dg/ext/arm-fp16/arm-fp16-ops-5.C
  g++.dg/ext/arm-fp16/arm-fp16-ops-6.C
  gcc.dg/torture/arm-fp16-ops-5.c
  gcc.dg/torture/arm-fp16-ops-6.c
  gcc.target/arm/fp16-compile-vcvt.c

The option -mfpu-neon-fp16 is added via "dg-add-options arm_neon_fp16"
after an earlier "dg-require-effective-target arm_neon_fp16_ok".
This patch modifies check_effective_target_arm_neon_fp16_ok_nocache to
return 0 (causing the test to be skipped) if multilib flags include
-mfpu= with a value other than neon-fp16.

Tested on arm-none-linux-gnueabi for several multilibs; these tests
are compile-only so it didn't matter that I didn't have runtime
support for them.

OK for trunk and 4.6 branch?

[-- Attachment #2: gcc-20110607-3 --]
[-- Type: text/plain, Size: 927 bytes --]

2011-06-07  Janis Johnson  <janisjo@codesourcery.com>

	* lib/target-supports.exp
	(check_effective_target_arm_neon_fp16_ok_nocache): Return 0 if
	multilib flags use -mfpu with a value other than neon-fp16.

Index: gcc/testsuite/lib/target-supports.exp
===================================================================
--- gcc/testsuite/lib/target-supports.exp	(revision 174764)
+++ gcc/testsuite/lib/target-supports.exp	(working copy)
@@ -1954,6 +1954,11 @@
     global et_arm_neon_fp16_flags
     set et_arm_neon_fp16_flags ""
     if { [check_effective_target_arm32] } {
+	# Multilib flags that include -mfpu would override the flags set here;
+	# skip them.
+	if [check-flags [list "" { *-*-* } { "-mfpu=*" } { "-mfpu=neon-fp16" } ]] {
+	    return 0
+	}
 	# Always add -mfpu=neon-fp16, since there is no preprocessor
 	# macro for FP16 support.
 	foreach flags {"-mfpu=neon-fp16" "-mfpu=neon-fp16 -mfloat-abi=softfp"} {

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-06-27  2:12 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-08  1:29 [testsuite] skip ARM neon-fp16 tests for other -mcpu values Janis Johnson
2011-06-08  2:05 ` Mike Stump
2011-06-08  2:14   ` Janis Johnson
2011-06-08 10:24 ` Joseph S. Myers
2011-06-08 16:16   ` Janis Johnson
2011-06-10  0:04   ` Janis Johnson
2011-06-15 13:07     ` Richard Earnshaw
2011-06-16  6:28       ` Janis Johnson
2011-06-26  4:29         ` Mike Stump
2011-06-27  5:08           ` Janis Johnson

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).