From 8746a2153f721a2232d9d09a7497881fa8ea168b Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 29 Nov 2017 18:38:54 +0100 Subject: [PATCH] re PR tree-optimization/83195 (pr82929.c scan for "Merging successful" fail) PR tree-optimization/83195 * gcc.dg/pr82929.c: Don't check for "Merging successful" on arm. * gcc.dg/pr82929-2.c: New test. From-SVN: r255247 --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gcc.dg/pr82929-2.c | 21 +++++++++++++++++++++ gcc/testsuite/gcc.dg/pr82929.c | 2 +- 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.dg/pr82929-2.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index bf1e37444ba..55b160e44ef 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2017-11-29 Jakub Jelinek + + PR tree-optimization/83195 + * gcc.dg/pr82929.c: Don't check for "Merging successful" on arm. + * gcc.dg/pr82929-2.c: New test. + 2017-11-29 Richard Biener PR tree-optimization/83202 diff --git a/gcc/testsuite/gcc.dg/pr82929-2.c b/gcc/testsuite/gcc.dg/pr82929-2.c new file mode 100644 index 00000000000..3442f91af02 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr82929-2.c @@ -0,0 +1,21 @@ +/* PR tree-optimization/82929 */ +/* { dg-do compile { target store_merge } } */ +/* { dg-options "-O2 -fdump-tree-store-merging" } */ + +void +foo (short *p, short *q, short *r) +{ + p = __builtin_assume_aligned (p, __alignof__ (int)); + q = __builtin_assume_aligned (q, __alignof__ (int)); + r = __builtin_assume_aligned (r, __alignof__ (int)); + short a = q[0]; + short b = q[1]; + short c = ~a; + short d = r[0]; + short e = r[1]; + short f = ~b; + p[0] = c & d; + p[1] = e & f; +} + +/* { dg-final { scan-tree-dump-times "Merging successful" 1 "store-merging" } } */ diff --git a/gcc/testsuite/gcc.dg/pr82929.c b/gcc/testsuite/gcc.dg/pr82929.c index afe9394ab31..bb84f2b21a3 100644 --- a/gcc/testsuite/gcc.dg/pr82929.c +++ b/gcc/testsuite/gcc.dg/pr82929.c @@ -15,4 +15,4 @@ foo (short *p, short *q, short *r) p[1] = e & f; } -/* { dg-final { scan-tree-dump-times "Merging successful" 1 "store-merging" } } */ +/* { dg-final { scan-tree-dump-times "Merging successful" 1 "store-merging" { target { ! arm*-*-* } } } } */ -- 2.30.2