This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch, testsuite, ARM] don't try to execute advsimd-intrinsics tests on hardware without NEON


ARM testing shares the AArch64 advsimd-intrinsics execution tests. On ARM, though, the NEON support being tested is optional -- some arches are compatible with the NEON compilation options but hardware available for testing might or might not be able to execute those instructions. In arm-none-eabi testing of a long list of multilibs, I found that this problem caused some of the multilibs to get stuck for days because every one of these execution tests was wandering off into the weeds and timing out.

The vect.exp tests already handle this by setting dg-do-what-default to either "run" or "compile", depending on whether we have target hardware execution support (arm_neon_hw) for NEON, or only compilation support (arm_neon_ok). So, I've adapted that logic for advsimd-intrinsics.exp too.

It also appeared that the main loop over the test cases was running them all twice with the torture options -- once using c-torture-execute and once using gcc-dg-runtest. I deleted the former since it appears to ignore dg-do-what-default and always try to execute no matter what. My dejagnu-fu isn't the strongest and this is pretty confusing to me.... am I missing something here? Otherwise, OK to commit?

-Sandra

2015-05-20  Sandra Loosemore  <sandra@codesourcery.com>

	gcc/testsuite/
	* gcc.target/aarch64/advsimd-intrinsics/advsimd-intrinsics.exp:
	Set dg-do-what-default to compile only on ARM targets without
	arm_neon_hw execution support.  Remove redundant c-torture-execute
	in loop over test cases.
Index: gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/advsimd-intrinsics.exp
===================================================================
--- gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/advsimd-intrinsics.exp	(revision 223468)
+++ gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/advsimd-intrinsics.exp	(working copy)
@@ -32,9 +32,20 @@ load_lib torture-options.exp
 
 dg-init
 
-if {[istarget arm*-*-*]
-    && ![check_effective_target_arm_neon_ok]} then {
-  return
+# The default action for a test is 'run'.  Save current default.
+global dg-do-what-default
+set save-dg-do-what-default ${dg-do-what-default}
+set dg-do-what-default run
+
+# For ARM, make sure that we have a target compatible with NEON, and do
+# not attempt to run execution tests if the hardware doesn't support it.
+if {[istarget arm*-*-*]} then {
+    if {![check_effective_target_arm_neon_ok]} then {
+      return
+    }
+    if {![is-effective-target arm_neon_hw]} then {
+        set dg-do-what-default compile
+    }
 }
 
 torture-init
@@ -55,11 +66,11 @@ foreach src [lsort [glob -nocomplain $sr
     # performed if the above runtest_file_p decided this runtest
     # instance should execute the test
     gcc_parallel_test_enable 0
-    c-torture-execute $src $additional_flags
     gcc-dg-runtest $src "" $additional_flags
     gcc_parallel_test_enable 1
 }
 
 # All done.
+set dg-do-what-default ${save-dg-do-what-default}
 torture-finish
 dg-finish

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]