public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] PR testsuite/86540, twiddle for aarch64
@ 2018-12-06 15:36 Jeff Law
  2018-12-07 13:46 ` Richard Earnshaw (lists)
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Law @ 2018-12-06 15:36 UTC (permalink / raw)
  To: gcc-patches

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


As outlined in the PR, the aarch64 has a non-default value for
CASE_VALUES_THRESHOLD which changes decisions in switch lowering.  Those
changes in switch lowering can expose additional jump threads later in
the pipeline which cause heartburn for a couple tests.

I looked at all the other ports with a non-default value of
CASE_VALUES_THRESHOLD and only aarch64 is high enough to trigger these
changes in behavior on the two relevant tests.  So I'm just skipping the
tests that run after switch lowering on aarch64.

Verified with a cross that these tests now pass.

Committing to the trunk,

Jeff

[-- Attachment #2: P --]
[-- Type: text/plain, Size: 2976 bytes --]

diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 1adb751cd34..0272bbe0605 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2018-12-06  Jeff Law  <law@redhat.com>
+
+	PR testsuite/86540
+	* gcc.dg/tree-ssa/ssa-dom-thread-7.c: Skip the post switch conversion
+	tests on aarch64.
+	* gcc.dg/tree-ssa/pr77445-2.c: Similarly.
+ 
 2018-12-06  David Malcolm  <dmalcolm@redhat.com>
 
 	PR c++/85110
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr77445-2.c b/gcc/testsuite/gcc.dg/tree-ssa/pr77445-2.c
index eecfc4b195a..c5d567dabdc 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr77445-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr77445-2.c
@@ -118,10 +118,14 @@ enum STATES FMS( u8 **in , u32 *transitions) {
 
 /* The profile is not updated perfectly because it is inconsitent from
    profile estimation stage. But the number of inconsistencies should not
-   increase much.  */
+   increase much. 
+
+   aarch64 has the highest CASE_VALUES_THRESHOLD in GCC.  It's high enough
+   to change decisions in switch expansion which in turn can expose new
+   jump threading opportunities.  Skip the later tests on aarch64.  */
 /* { dg-final { scan-tree-dump "Jumps threaded: 1\[1-9\]" "thread1" } } */
 /* { dg-final { scan-tree-dump-times "Invalid sum" 3 "thread1" } } */
 /* { dg-final { scan-tree-dump-not "not considered" "thread1" } } */
 /* { dg-final { scan-tree-dump-not "not considered" "thread2" } } */
-/* { dg-final { scan-tree-dump-not "not considered" "thread3" } } */
-/* { dg-final { scan-tree-dump-not "not considered" "thread4" } } */
+/* { dg-final { scan-tree-dump-not "not considered" "thread3" { target { ! aarch64*-*-* } } } } */
+/* { dg-final { scan-tree-dump-not "not considered" "thread4" { target { ! aarch64*-*-* } } } } */ 
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-7.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-7.c
index e395de26ec0..f833aa4351d 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-7.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-7.c
@@ -3,8 +3,11 @@
 /* { dg-final { scan-tree-dump "Jumps threaded: 16"  "thread1" } } */
 /* { dg-final { scan-tree-dump "Jumps threaded: 9" "thread2" } } */
 /* { dg-final { scan-tree-dump "Jumps threaded: 1"  "dom2" } } */
-/* { dg-final { scan-tree-dump-not "Jumps threaded"  "dom3" } } */
-/* { dg-final { scan-tree-dump-not "Jumps threaded"  "vrp2" } } */
+/* aarch64 has the highest CASE_VALUES_THRESHOLD in GCC.  It's high enough
+   to change decisions in switch expansion which in turn can expose new
+   jump threading opportunities.  Skip the later tests on aarch64.  */
+/* { dg-final { scan-tree-dump-not "Jumps threaded"  "dom3" { target { ! aarch64*-*-* } } } } */
+/* { dg-final { scan-tree-dump-not "Jumps threaded"  "vrp2" { target { ! aarch64*-*-* } } } } */
 
 /* Most architectures get 3 threadable paths here, whereas aarch64 and
    possibly others get 5.  We really should rewrite threading tests to

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

* Re: [committed] PR testsuite/86540, twiddle for aarch64
  2018-12-06 15:36 [committed] PR testsuite/86540, twiddle for aarch64 Jeff Law
@ 2018-12-07 13:46 ` Richard Earnshaw (lists)
  2018-12-07 15:06   ` Jeff Law
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Earnshaw (lists) @ 2018-12-07 13:46 UTC (permalink / raw)
  To: Jeff Law, gcc-patches

On 06/12/2018 15:36, Jeff Law wrote:
> 
> As outlined in the PR, the aarch64 has a non-default value for
> CASE_VALUES_THRESHOLD which changes decisions in switch lowering.  Those
> changes in switch lowering can expose additional jump threads later in
> the pipeline which cause heartburn for a couple tests.
> 
> I looked at all the other ports with a non-default value of
> CASE_VALUES_THRESHOLD and only aarch64 is high enough to trigger these
> changes in behavior on the two relevant tests.  So I'm just skipping the
> tests that run after switch lowering on aarch64.
> 
> Verified with a cross that these tests now pass.
> 
> Committing to the trunk,
> 

Can't we use a param to force the value back to (near) the default?
That would then work even if other targets start changing the default here.

R.


> Jeff
> 
> 
> P
> 
> diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
> index 1adb751cd34..0272bbe0605 100644
> --- a/gcc/testsuite/ChangeLog
> +++ b/gcc/testsuite/ChangeLog
> @@ -1,3 +1,10 @@
> +2018-12-06  Jeff Law  <law@redhat.com>
> +
> +	PR testsuite/86540
> +	* gcc.dg/tree-ssa/ssa-dom-thread-7.c: Skip the post switch conversion
> +	tests on aarch64.
> +	* gcc.dg/tree-ssa/pr77445-2.c: Similarly.
> + 
>  2018-12-06  David Malcolm  <dmalcolm@redhat.com>
>  
>  	PR c++/85110
> diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr77445-2.c b/gcc/testsuite/gcc.dg/tree-ssa/pr77445-2.c
> index eecfc4b195a..c5d567dabdc 100644
> --- a/gcc/testsuite/gcc.dg/tree-ssa/pr77445-2.c
> +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr77445-2.c
> @@ -118,10 +118,14 @@ enum STATES FMS( u8 **in , u32 *transitions) {
>  
>  /* The profile is not updated perfectly because it is inconsitent from
>     profile estimation stage. But the number of inconsistencies should not
> -   increase much.  */
> +   increase much. 
> +
> +   aarch64 has the highest CASE_VALUES_THRESHOLD in GCC.  It's high enough
> +   to change decisions in switch expansion which in turn can expose new
> +   jump threading opportunities.  Skip the later tests on aarch64.  */
>  /* { dg-final { scan-tree-dump "Jumps threaded: 1\[1-9\]" "thread1" } } */
>  /* { dg-final { scan-tree-dump-times "Invalid sum" 3 "thread1" } } */
>  /* { dg-final { scan-tree-dump-not "not considered" "thread1" } } */
>  /* { dg-final { scan-tree-dump-not "not considered" "thread2" } } */
> -/* { dg-final { scan-tree-dump-not "not considered" "thread3" } } */
> -/* { dg-final { scan-tree-dump-not "not considered" "thread4" } } */
> +/* { dg-final { scan-tree-dump-not "not considered" "thread3" { target { ! aarch64*-*-* } } } } */
> +/* { dg-final { scan-tree-dump-not "not considered" "thread4" { target { ! aarch64*-*-* } } } } */ 
> diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-7.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-7.c
> index e395de26ec0..f833aa4351d 100644
> --- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-7.c
> +++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-7.c
> @@ -3,8 +3,11 @@
>  /* { dg-final { scan-tree-dump "Jumps threaded: 16"  "thread1" } } */
>  /* { dg-final { scan-tree-dump "Jumps threaded: 9" "thread2" } } */
>  /* { dg-final { scan-tree-dump "Jumps threaded: 1"  "dom2" } } */
> -/* { dg-final { scan-tree-dump-not "Jumps threaded"  "dom3" } } */
> -/* { dg-final { scan-tree-dump-not "Jumps threaded"  "vrp2" } } */
> +/* aarch64 has the highest CASE_VALUES_THRESHOLD in GCC.  It's high enough
> +   to change decisions in switch expansion which in turn can expose new
> +   jump threading opportunities.  Skip the later tests on aarch64.  */
> +/* { dg-final { scan-tree-dump-not "Jumps threaded"  "dom3" { target { ! aarch64*-*-* } } } } */
> +/* { dg-final { scan-tree-dump-not "Jumps threaded"  "vrp2" { target { ! aarch64*-*-* } } } } */
>  
>  /* Most architectures get 3 threadable paths here, whereas aarch64 and
>     possibly others get 5.  We really should rewrite threading tests to
> 

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

* Re: [committed] PR testsuite/86540, twiddle for aarch64
  2018-12-07 13:46 ` Richard Earnshaw (lists)
@ 2018-12-07 15:06   ` Jeff Law
  0 siblings, 0 replies; 3+ messages in thread
From: Jeff Law @ 2018-12-07 15:06 UTC (permalink / raw)
  To: Richard Earnshaw (lists), gcc-patches

On 12/7/18 6:46 AM, Richard Earnshaw (lists) wrote:
> On 06/12/2018 15:36, Jeff Law wrote:
>>
>> As outlined in the PR, the aarch64 has a non-default value for
>> CASE_VALUES_THRESHOLD which changes decisions in switch lowering.  Those
>> changes in switch lowering can expose additional jump threads later in
>> the pipeline which cause heartburn for a couple tests.
>>
>> I looked at all the other ports with a non-default value of
>> CASE_VALUES_THRESHOLD and only aarch64 is high enough to trigger these
>> changes in behavior on the two relevant tests.  So I'm just skipping the
>> tests that run after switch lowering on aarch64.
>>
>> Verified with a cross that these tests now pass.
>>
>> Committing to the trunk,
>>
> 
> Can't we use a param to force the value back to (near) the default?
> That would then work even if other targets start changing the default here.
That would have been my preference, but I didn't see a suitable PARAM
and adding one just for these two tests seemed like overkill.

jeff

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

end of thread, other threads:[~2018-12-07 15:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-06 15:36 [committed] PR testsuite/86540, twiddle for aarch64 Jeff Law
2018-12-07 13:46 ` Richard Earnshaw (lists)
2018-12-07 15:06   ` Jeff Law

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