Patchwork [testsuite] vect effective targets should use arm_neon_ok

login
register
mail settings
Submitter Janis Johnson
Date Sept. 18, 2012, 7:54 p.m.
Message ID <5058D171.9020901@mentor.com>
Download mbox | patch
Permalink /patch/184820/
State New
Headers show

Comments

Janis Johnson - Sept. 18, 2012, 7:54 p.m.
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  <janisjo@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.
Janis Johnson - Sept. 18, 2012, 8:59 p.m.
On 09/18/2012 12:54 PM, Janis Johnson wrote:
> 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.

Oops, I got that wrong.  There are other effective-targets that might
need arm_little_endian, but not vect_multiple_sizes.  I'll file a PR
when I have better information.

> Checked in on trunk as obvious.  I'll backport to 4.6 when it's open.
> 
> Janis
Richard Earnshaw - Sept. 19, 2012, 8:43 a.m.
On 18/09/12 21:59, Janis Johnson wrote:
> On 09/18/2012 12:54 PM, Janis Johnson wrote:
>> 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.
> 

Sadly, there are almost certainly bugs in the big-endian support for ARM
Neon.
Janis Johnson - Sept. 19, 2012, 8:40 p.m.
On 09/19/2012 01:43 AM, Richard Earnshaw wrote:
> On 18/09/12 21:59, Janis Johnson wrote:
>> On 09/18/2012 12:54 PM, Janis Johnson wrote:
>>> 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.
>>
> 
> Sadly, there are almost certainly bugs in the big-endian support for ARM
> Neon.

I filed PR testsuite/54622 with a list of the vect tests failures for
ARM big-endian.  There aren't really issues with vect_multiple_sizes,
but there are some vect effective targets for which ARM big-endian
fails all tests.  I had originally thought the problems were with the
tests; apparently not.

Janis

Patch

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-*-*]) } {