From: Wilco Dijkstra Date: Wed, 3 Jul 2019 16:40:17 +0000 (+0000) Subject: Fix store merging tests on Arm X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e5833b56497c5cf04034ce68d6b9c73c2600158b;p=gcc.git Fix store merging tests on Arm Fix the failing store merging test on Arm. Aligning variables fixes a few cases, otherwise disable the test on Arm. All store merging tests now pass. Committed as obvious. testsuite/ * gcc.dg/store_merging_27.c: Fix test for Arm. * gcc.dg/store_merging_28.c: Likewise. * gcc.dg/store_merging_29.c: Likewise. * gcc.dg/tree-ssa/dump-6.c: Likewise. From-SVN: r273011 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 95db1ad5806..1695bab499b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2019-07-03 Wilco Dijkstra + + * gcc.dg/store_merging_27.c: Fix test for Arm. + * gcc.dg/store_merging_28.c: Likewise. + * gcc.dg/store_merging_29.c: Likewise. + * gcc.dg/tree-ssa/dump-6.c: Likewise. + 2019-07-03 Richard Biener PR middle-end/91069 diff --git a/gcc/testsuite/gcc.dg/store_merging_27.c b/gcc/testsuite/gcc.dg/store_merging_27.c index a691368ad3f..d3cd117bdc6 100644 --- a/gcc/testsuite/gcc.dg/store_merging_27.c +++ b/gcc/testsuite/gcc.dg/store_merging_27.c @@ -18,7 +18,7 @@ bar (struct S *x) int main () { - struct S s = {}; + __attribute__((aligned(8))) struct S s = {}; s.buf[1] = 1; s.buf[3] = 2; bar (&s); diff --git a/gcc/testsuite/gcc.dg/store_merging_28.c b/gcc/testsuite/gcc.dg/store_merging_28.c index 95a082288d7..2d6cffc4694 100644 --- a/gcc/testsuite/gcc.dg/store_merging_28.c +++ b/gcc/testsuite/gcc.dg/store_merging_28.c @@ -3,7 +3,7 @@ /* { dg-require-effective-target store_merge } */ /* { dg-options "-O2 -fno-ipa-icf -fdump-tree-store-merging-details" } */ /* { dg-final { scan-tree-dump-times "New sequence of \[24] stores to replace old one of 16 stores" 8 "store-merging" { target { i?86-*-* x86_64-*-* } } } } */ -/* { dg-final { scan-tree-dump-times "New sequence of \[24] stores to replace old one of 6 stores" 1 "store-merging" } } */ +/* { dg-final { scan-tree-dump-times "New sequence of \[24] stores to replace old one of 6 stores" 1 "store-merging" { target { ! arm*-*-* } } } } */ typedef struct S { char data[16]; } S; void optimize_me (S); diff --git a/gcc/testsuite/gcc.dg/store_merging_29.c b/gcc/testsuite/gcc.dg/store_merging_29.c index 777020fab5a..6b32aa9b6f9 100644 --- a/gcc/testsuite/gcc.dg/store_merging_29.c +++ b/gcc/testsuite/gcc.dg/store_merging_29.c @@ -3,7 +3,7 @@ /* { dg-require-effective-target store_merge } */ /* { dg-options "-O2 -fdump-tree-store-merging-details" } */ /* { dg-final { scan-tree-dump "New sequence of 3 stores to replace old one of 6 stores" "store-merging" { target { le && { ! arm*-*-* } } } } } */ -/* { dg-final { scan-tree-dump "New sequence of \[34] stores to replace old one of 6 stores" "store-merging" { target { be || { arm*-*-* } } } } } */ +/* { dg-final { scan-tree-dump "New sequence of \[34] stores to replace old one of 6 stores" "store-merging" { target { be && { ! arm*-*-* } } } } } */ struct T { char a[1024]; }; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/dump-6.c b/gcc/testsuite/gcc.dg/tree-ssa/dump-6.c index 3e09668ddc9..70659c00c0e 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/dump-6.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/dump-6.c @@ -5,7 +5,7 @@ { dg-require-effective-target store_merge } */ -extern char a2[2]; +extern __attribute__((aligned(2))) char a2[2]; void f2 (void) { @@ -13,7 +13,7 @@ void f2 (void) a2[1] = 0; } -extern char a4[4]; +extern __attribute__((aligned(4))) char a4[4]; void f4 (void) { @@ -23,7 +23,7 @@ void f4 (void) a4[3] = 0; } -extern char a8[8]; +extern __attribute__((aligned(8))) char a8[8]; void f8 (void) {