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(-) 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" } } */ -- 1.9.1