[PATCH 6/7] testsuite: skip cmp-mem-const on alpha

Matt Turner <[email protected]>
Newsgroups gmane.comp.gcc.patches
Message-ID <[email protected]>
Alpha does not narrow memory comparisons in combine, so the
"narrow comparison from mode .I to HI" scan never matches.  This is not
specific to byte/word memory access: -mbwx does not change it either.
Skip these tests the same way sparc and hppa already do.

gcc/testsuite/ChangeLog:

	* gcc.dg/cmp-mem-const-3.c: Skip on alpha.
	* gcc.dg/cmp-mem-const-4.c: Likewise.
	* gcc.dg/cmp-mem-const-5.c: Likewise.
	* gcc.dg/cmp-mem-const-6.c: Likewise.
---
 gcc/testsuite/gcc.dg/cmp-mem-const-3.c | 3 ++-
 gcc/testsuite/gcc.dg/cmp-mem-const-4.c | 3 ++-
 gcc/testsuite/gcc.dg/cmp-mem-const-5.c | 3 ++-
 gcc/testsuite/gcc.dg/cmp-mem-const-6.c | 3 ++-
 4 files changed, 8 insertions(+), 4 deletions(-)

diff --git ./gcc/testsuite/gcc.dg/cmp-mem-const-3.c ./gcc/testsuite/gcc.dg/cmp-mem-const-3.c
index 5469f10712e..bd19ffeb16c 100644
--- ./gcc/testsuite/gcc.dg/cmp-mem-const-3.c
+++ ./gcc/testsuite/gcc.dg/cmp-mem-const-3.c
@@ -1,6 +1,7 @@
-/* { dg-do compile { target { lp64 && { ! { sparc*-*-* hppa*-*-* } } } } } */
+/* { dg-do compile { target { lp64 && { ! { sparc*-*-* hppa*-*-* alpha*-*-* } } } } } */
 /* Excluding sparc since there we do not end up with a comparison of memory and
    a constant which means that the optimization is not applicable.  */
+/* Excluding alpha since memory comparisons are not narrowed there.  */
 /* { dg-options "-O2 -fdump-rtl-combine-details" } */
 /* { dg-final { scan-rtl-dump "narrow comparison from mode .I to HI" "combine" } } */
 
diff --git ./gcc/testsuite/gcc.dg/cmp-mem-const-4.c ./gcc/testsuite/gcc.dg/cmp-mem-const-4.c
index 9ea094e20eb..ff318e513ef 100644
--- ./gcc/testsuite/gcc.dg/cmp-mem-const-4.c
+++ ./gcc/testsuite/gcc.dg/cmp-mem-const-4.c
@@ -1,6 +1,7 @@
-/* { dg-do compile { target { lp64 && { ! { sparc*-*-* hppa*-*-* } } } } } */
+/* { dg-do compile { target { lp64 && { ! { sparc*-*-* hppa*-*-* alpha*-*-* } } } } } */
 /* Excluding sparc since there we do not end up with a comparison of memory and
    a constant which means that the optimization is not applicable.  */
+/* Excluding alpha since memory comparisons are not narrowed there.  */
 /* { dg-options "-O2 -fdump-rtl-combine-details" } */
 /* { dg-final { scan-rtl-dump "narrow comparison from mode .I to HI" "combine" } } */
 
diff --git ./gcc/testsuite/gcc.dg/cmp-mem-const-5.c ./gcc/testsuite/gcc.dg/cmp-mem-const-5.c
index 5a9096ef84d..1e3d530b99e 100644
--- ./gcc/testsuite/gcc.dg/cmp-mem-const-5.c
+++ ./gcc/testsuite/gcc.dg/cmp-mem-const-5.c
@@ -1,6 +1,7 @@
-/* { dg-do compile { target { lp64 && { ! { sparc*-*-* hppa*-*-* } } } } } */
+/* { dg-do compile { target { lp64 && { ! { sparc*-*-* hppa*-*-* alpha*-*-* } } } } } */
 /* Excluding sparc since there a prior optimization already reduced the
    constant, i.e., nothing left for us.  */
+/* Excluding alpha since memory comparisons are not narrowed there.  */
 /* { dg-options "-O2 -fdump-rtl-combine-details" } */
 /* { dg-final { scan-rtl-dump "narrow comparison from mode .I to SI" "combine" } } */
 
diff --git ./gcc/testsuite/gcc.dg/cmp-mem-const-6.c ./gcc/testsuite/gcc.dg/cmp-mem-const-6.c
index 381195361e0..c1d0124f9d2 100644
--- ./gcc/testsuite/gcc.dg/cmp-mem-const-6.c
+++ ./gcc/testsuite/gcc.dg/cmp-mem-const-6.c
@@ -1,6 +1,7 @@
-/* { dg-do compile { target { lp64 && { ! { sparc*-*-* hppa*-*-* } } } } } */
+/* { dg-do compile { target { lp64 && { ! { sparc*-*-* hppa*-*-* alpha*-*-* } } } } } */
 /* Excluding sparc since there a prior optimization already reduced the
    constant, i.e., nothing left for us.  */
+/* Excluding alpha since memory comparisons are not narrowed there.  */
 /* { dg-options "-O2 -fdump-rtl-combine-details" } */
 /* { dg-final { scan-rtl-dump "narrow comparison from mode .I to SI" "combine" } } */
 
-- 
2.54.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.