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

Jeff Law via Gcc-cvs <[email protected]>
Newsgroups gmane.comp.gcc.cvs
Message-ID <[email protected]>
https://gcc.gnu.org/g:ec5e102d66f182c9028fb88a7354a32a73ed0347

commit r17-3375-gec5e102d66f182c9028fb88a7354a32a73ed0347
Author: Matt Turner <[email protected]>
Date:   Tue Aug 18 08:40:49 2026 -0600

    [PATCH 6/7] testsuite: skip cmp-mem-const on alpha
    
    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.

Diff:
---
 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 a/gcc/testsuite/gcc.dg/cmp-mem-const-3.c b/gcc/testsuite/gcc.dg/cmp-mem-const-3.c
index 5469f10712ea..bd19ffeb16c0 100644
--- a/gcc/testsuite/gcc.dg/cmp-mem-const-3.c
+++ b/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 a/gcc/testsuite/gcc.dg/cmp-mem-const-4.c b/gcc/testsuite/gcc.dg/cmp-mem-const-4.c
index 9ea094e20ebb..ff318e513ef2 100644
--- a/gcc/testsuite/gcc.dg/cmp-mem-const-4.c
+++ b/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 a/gcc/testsuite/gcc.dg/cmp-mem-const-5.c b/gcc/testsuite/gcc.dg/cmp-mem-const-5.c
index 5a9096ef84de..1e3d530b99e8 100644
--- a/gcc/testsuite/gcc.dg/cmp-mem-const-5.c
+++ b/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 a/gcc/testsuite/gcc.dg/cmp-mem-const-6.c b/gcc/testsuite/gcc.dg/cmp-mem-const-6.c
index 381195361e0e..c1d0124f9d24 100644
--- a/gcc/testsuite/gcc.dg/cmp-mem-const-6.c
+++ b/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" } } */
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.