diff mbox

[Testsuite] Add --param sra-max-scalarization-size-Ospeed to sra-12.c

Message ID 1445442727-9557-1-git-send-email-alan.lawrence@arm.com
State New
Headers show

Commit Message

Alan Lawrence Oct. 21, 2015, 3:52 p.m. UTC
gcc.dg/tree-ssa/sra-12.c is skipped on a bunch of targets, including AArch64,
because the default max-scalarization-size depends on MOVE_RATIO, and on those
targets thus ends up being too small for SRA to optimize the testcase. Recently
I noticed that the test has been failing for some time on ARM too. This patch
fixes the test on ARM, AArch64, avr, and sh, and by extension I believe also on
nds32, although I haven't managed to build a nds32 compiler to check.

There is an argument that instead we should skip the test on ARM too; or rather,
since at least ARM and AArch64 would like the test to pass, we should xfail it
on those platforms until we have time to experiment with the threshold/param for
SRA. I hope to do some more investigation on that front as part of (or followup
to) PR/63679.

Is this OK for trunk?

Cheers,
Alan

gcc/testsuite/ChangeLog:

	* gcc.dg/tree-ssa/sra-12.c: Enable test on all targets; add --param
	sra-max-scalarization-size-Ospeed.
---
 gcc/testsuite/gcc.dg/tree-ssa/sra-12.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Jeff Law Oct. 21, 2015, 3:59 p.m. UTC | #1
On 10/21/2015 09:52 AM, Alan Lawrence wrote:
> gcc.dg/tree-ssa/sra-12.c is skipped on a bunch of targets, including AArch64,
> because the default max-scalarization-size depends on MOVE_RATIO, and on those
> targets thus ends up being too small for SRA to optimize the testcase. Recently
> I noticed that the test has been failing for some time on ARM too. This patch
> fixes the test on ARM, AArch64, avr, and sh, and by extension I believe also on
> nds32, although I haven't managed to build a nds32 compiler to check.
>
> There is an argument that instead we should skip the test on ARM too; or rather,
> since at least ARM and AArch64 would like the test to pass, we should xfail it
> on those platforms until we have time to experiment with the threshold/param for
> SRA. I hope to do some more investigation on that front as part of (or followup
> to) PR/63679.
>
> Is this OK for trunk?
>
> Cheers,
> Alan
>
> gcc/testsuite/ChangeLog:
>
> 	* gcc.dg/tree-ssa/sra-12.c: Enable test on all targets; add --param
> 	sra-max-scalarization-size-Ospeed.
OK.
jeff
Andre Vieira (lists) March 18, 2016, 10:34 a.m. UTC | #2
On 21/10/15 16:59, Jeff Law wrote:
> On 10/21/2015 09:52 AM, Alan Lawrence wrote:
>> gcc.dg/tree-ssa/sra-12.c is skipped on a bunch of targets, including
>> AArch64,
>> because the default max-scalarization-size depends on MOVE_RATIO, and
>> on those
>> targets thus ends up being too small for SRA to optimize the testcase.
>> Recently
>> I noticed that the test has been failing for some time on ARM too.
>> This patch
>> fixes the test on ARM, AArch64, avr, and sh, and by extension I
>> believe also on
>> nds32, although I haven't managed to build a nds32 compiler to check.
>>
>> There is an argument that instead we should skip the test on ARM too;
>> or rather,
>> since at least ARM and AArch64 would like the test to pass, we should
>> xfail it
>> on those platforms until we have time to experiment with the
>> threshold/param for
>> SRA. I hope to do some more investigation on that front as part of (or
>> followup
>> to) PR/63679.
>>
>> Is this OK for trunk?
>>
>> Cheers,
>> Alan
>>
>> gcc/testsuite/ChangeLog:
>>
>>     * gcc.dg/tree-ssa/sra-12.c: Enable test on all targets; add --param
>>     sra-max-scalarization-size-Ospeed.
> OK.
> jeff
> 

OK to backport this to gcc-5-branch?

Cheers,
Andre
Andre Vieira (lists) April 4, 2016, 12:29 p.m. UTC | #3
On 18/03/16 10:34, Andre Vieira (lists) wrote:
> On 21/10/15 16:59, Jeff Law wrote:
>> On 10/21/2015 09:52 AM, Alan Lawrence wrote:
>>> gcc.dg/tree-ssa/sra-12.c is skipped on a bunch of targets, including
>>> AArch64,
>>> because the default max-scalarization-size depends on MOVE_RATIO, and
>>> on those
>>> targets thus ends up being too small for SRA to optimize the testcase.
>>> Recently
>>> I noticed that the test has been failing for some time on ARM too.
>>> This patch
>>> fixes the test on ARM, AArch64, avr, and sh, and by extension I
>>> believe also on
>>> nds32, although I haven't managed to build a nds32 compiler to check.
>>>
>>> There is an argument that instead we should skip the test on ARM too;
>>> or rather,
>>> since at least ARM and AArch64 would like the test to pass, we should
>>> xfail it
>>> on those platforms until we have time to experiment with the
>>> threshold/param for
>>> SRA. I hope to do some more investigation on that front as part of (or
>>> followup
>>> to) PR/63679.
>>>
>>> Is this OK for trunk?
>>>
>>> Cheers,
>>> Alan
>>>
>>> gcc/testsuite/ChangeLog:
>>>
>>>     * gcc.dg/tree-ssa/sra-12.c: Enable test on all targets; add --param
>>>     sra-max-scalarization-size-Ospeed.
>> OK.
>> jeff
>>
> 
> OK to backport this to gcc-5-branch?
> 
> Cheers,
> Andre
> 
Ping.
diff mbox

Patch

diff --git a/gcc/testsuite/gcc.dg/tree-ssa/sra-12.c b/gcc/testsuite/gcc.dg/tree-ssa/sra-12.c
index 427f7af..139c7d1 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/sra-12.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/sra-12.c
@@ -1,7 +1,6 @@ 
 /* Verify that SRA total scalarization will not be confused by padding.  */
-/* Test skipped for targets with small (often default) MOVE_RATIO.  */
 /* { dg-do compile } */
-/* { dg-options "-O1 -fdump-tree-release_ssa" } */
+/* { dg-options "-O1 --param sra-max-scalarization-size-Ospeed=16 -fdump-tree-release_ssa" } */
 
 struct S
 {
@@ -21,4 +20,4 @@  int foo (struct S *p)
   *p = l;
 }
 
-/* { dg-final { scan-tree-dump-times "l;" 0 "release_ssa" { target { ! "aarch64*-*-* avr*-*-* nds32*-*-* sh*-*-*" } } } } */
+/* { dg-final { scan-tree-dump-times "l;" 0 "release_ssa" } } */