In most cases a test that requires ARM NEON should use effective target
arm_neon, which means that flags run for all tests include NEON support.
The result is cached the first time it is checked for a multilib.

Vectorization tests, when run for ARM, add flags to support NEON if it's
OK to do so, but those flags are not reflected in the cached results for
arm_neon, nor should they be.  Because of this, vect effective-target
checks should use arm_neon_ok (as most already do) instead of arm_neon.

This patch changes the checks for 7 effective targets, allowing more
tests to run and decreasing the number of failures.  The only new
failures I've seen in tests on arm-none-eabi with a variety of test
multilibs are for big-endian with vect_multiple_sizes, which means
that vect_multiple_sizes should be false for big endian or that there's
a bug in ARM big-endian support.

Checked in on trunk as obvious.  I'll backport to 4.6 when it's open.

Janis
2012-09-18  Janis Johnson  <jani...@codesourcery.com>

        * lib/target-supports.exp
        (check_effective_target_vect_widen_mult_qi_to_hi,
        check_effective_target_vect_widen_mult_hi_to_si,
        check_effective_target_vect_widen_mult_qi_to_hi_pattern,
        check_effective_target_vect_widen_mult_hi_to_si_pattern,
        check_effective_target_vect_pack_trunc,
        check_effective_target_vect_unpack,
        check_effective_target_vect_multiple_sizes): Check arm_neon_ok
        instead of arm_none.

Index: lib/target-supports.exp
===================================================================
--- lib/target-supports.exp     (revision 191440)
+++ lib/target-supports.exp     (working copy)
@@ -3097,7 +3097,7 @@
            set et_vect_widen_mult_qi_to_hi_saved 0
        }
         if { [istarget powerpc*-*-*]
-              || ([istarget arm*-*-*] && [check_effective_target_arm_neon]) } {
+              || ([istarget arm*-*-*] && [check_effective_target_arm_neon_ok]) 
} {
             set et_vect_widen_mult_qi_to_hi_saved 1
         }
     }
@@ -3131,7 +3131,7 @@
              || [istarget ia64-*-*]
              || [istarget i?86-*-*]
              || [istarget x86_64-*-*]
-              || ([istarget arm*-*-*] && [check_effective_target_arm_neon]) } {
+              || ([istarget arm*-*-*] && [check_effective_target_arm_neon_ok]) 
} {
             set et_vect_widen_mult_hi_to_si_saved 1
         }
     }
@@ -3152,7 +3152,7 @@
     } else {
         set et_vect_widen_mult_qi_to_hi_pattern_saved 0
         if { [istarget powerpc*-*-*]
-              || ([istarget arm*-*-*] && [check_effective_target_arm_neon]) } {
+              || ([istarget arm*-*-*] && [check_effective_target_arm_neon_ok]) 
} {
             set et_vect_widen_mult_qi_to_hi_pattern_saved 1
         }
     }
@@ -3177,7 +3177,7 @@
               || [istarget ia64-*-*]
               || [istarget i?86-*-*]
               || [istarget x86_64-*-*]
-              || ([istarget arm*-*-*] && [check_effective_target_arm_neon]) } {
+              || ([istarget arm*-*-*] && [check_effective_target_arm_neon_ok]) 
} {
             set et_vect_widen_mult_hi_to_si_pattern_saved 1
         }
     }
@@ -3307,7 +3307,7 @@
              || [istarget i?86-*-*]
              || [istarget x86_64-*-*]
              || [istarget spu-*-*]
-             || ([istarget arm*-*-*] && [check_effective_target_arm_neon]
+             || ([istarget arm*-*-*] && [check_effective_target_arm_neon_ok]
                 && [check_effective_target_arm_little_endian]) } {
             set et_vect_pack_trunc_saved 1
         }
@@ -3333,7 +3333,7 @@
              || [istarget x86_64-*-*] 
              || [istarget spu-*-*]
              || [istarget ia64-*-*]
-             || ([istarget arm*-*-*] && [check_effective_target_arm_neon]
+             || ([istarget arm*-*-*] && [check_effective_target_arm_neon_ok]
                 && [check_effective_target_arm_little_endian]) } {
             set et_vect_unpack_saved 1
         }
@@ -3751,7 +3751,7 @@
     global et_vect_multiple_sizes_saved
 
     set et_vect_multiple_sizes_saved 0
-    if { ([istarget arm*-*-*] && [check_effective_target_arm_neon]) } {
+    if { ([istarget arm*-*-*] && [check_effective_target_arm_neon_ok]) } {
        set et_vect_multiple_sizes_saved 1
     }
     if { ([istarget x86_64-*-*] || [istarget i?86-*-*]) } {

Reply via email to