From 66b8801141f5c1a65613b8f42501e8cd4b9195d9 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 14 Apr 2020 16:14:47 +0200 Subject: [PATCH] testsuite: Add testcase for already fixed PR [PR94573] 2020-04-14 Jakub Jelinek PR tree-optimization/94573 * gcc.dg/store_merging_30.c: New test. --- gcc/testsuite/ChangeLog | 7 ++++++- gcc/testsuite/gcc.dg/store_merging_30.c | 20 ++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.dg/store_merging_30.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 051dcb1..64ee01b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,4 +1,9 @@ -2020-04-14 Yang Yang +2020-04-14 Jakub Jelinek + + PR tree-optimization/94573 + * gcc.dg/store_merging_30.c: New test. + +2020-04-14 Yang Yang PR tree-optimization/94574 * gcc.dg/pr94574.c: New test. diff --git a/gcc/testsuite/gcc.dg/store_merging_30.c b/gcc/testsuite/gcc.dg/store_merging_30.c new file mode 100644 index 0000000..694d560 --- /dev/null +++ b/gcc/testsuite/gcc.dg/store_merging_30.c @@ -0,0 +1,20 @@ +/* PR tree-optimization/94573 */ +/* { dg-do compile } */ +/* { dg-require-effective-target store_merge } */ +/* { dg-options "-O2 -fdump-tree-store-merging-details" } */ +/* { dg-final { scan-tree-dump "New sequence of 4 stores to replace old one of 8 stores" "store-merging" { target lp64 } } } */ + +int var[43][12]; + +void +foo (int x) +{ + var[x][0] = 0; + var[x][1] = 0; + var[x][2] = 0; + var[x][3] = 0; + var[x][4] = 0; + var[x][5] = 0; + var[x][6] = 0; + var[x][7] = 0; +} -- 2.7.4