]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
rtl-optimization/110869 Fix tests cmp-mem-const-*.c for sparc
authorStefan Schulze Frielinghaus <stefansf@linux.ibm.com>
Tue, 8 Aug 2023 06:53:12 +0000 (08:53 +0200)
committerStefan Schulze Frielinghaus <stefansf@linux.ibm.com>
Tue, 8 Aug 2023 06:53:12 +0000 (08:53 +0200)
This fixes the rather new tests cmp-mem-const-{1,2,3,4,5,6}.c for sparc.
For -1 and -2 we need at least optimization level 2 on sparc.  For the
sake of homogeneity, change all test cases to -O2.  For -3 and -4 we do
not end up with a comparison of memory and a constant, and finally for
-5 and -6 the constants are reduced by a prior optimization which means
there is nothing left to do.  Thus excluding sparc from those tests.

gcc/testsuite/ChangeLog:

PR rtl-optimization/110869
* gcc.dg/cmp-mem-const-1.c: Use optimization level 2.
* gcc.dg/cmp-mem-const-2.c: Dito.
* gcc.dg/cmp-mem-const-3.c: Exclude sparc from this test.
* gcc.dg/cmp-mem-const-4.c: Dito.
* gcc.dg/cmp-mem-const-5.c: Dito.
* gcc.dg/cmp-mem-const-6.c: Dito.

gcc/testsuite/gcc.dg/cmp-mem-const-1.c
gcc/testsuite/gcc.dg/cmp-mem-const-2.c
gcc/testsuite/gcc.dg/cmp-mem-const-3.c
gcc/testsuite/gcc.dg/cmp-mem-const-4.c
gcc/testsuite/gcc.dg/cmp-mem-const-5.c
gcc/testsuite/gcc.dg/cmp-mem-const-6.c

index 4f21a1ade4a314304b4b8e210c9b945c4b62cad4..0b0e7331354a1ca7f73849f7644e7e371db1a293 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile { target { lp64 } } } */
-/* { dg-options "-O1 -fdump-rtl-combine-details" } */
+/* { dg-options "-O2 -fdump-rtl-combine-details" } */
 /* { dg-final { scan-rtl-dump "narrow comparison from mode .I to QI" "combine" } } */
 
 typedef __UINT64_TYPE__ uint64_t;
index 7b722951594c89f004d341e0c48f394516353471..8022137a8ecaac245779b47750f100364dedd958 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile { target { lp64 } } } */
-/* { dg-options "-O1 -fdump-rtl-combine-details" } */
+/* { dg-options "-O2 -fdump-rtl-combine-details" } */
 /* { dg-final { scan-rtl-dump "narrow comparison from mode .I to QI" "combine" } } */
 
 typedef __UINT64_TYPE__ uint64_t;
index ed5059d380741963b5f95beb9351426dde34d6d7..c60ecdb4026cd3db39b7546b984b6a87c5ef0299 100644 (file)
@@ -1,5 +1,7 @@
-/* { dg-do compile { target { lp64 } } } */
-/* { dg-options "-O1 -fdump-rtl-combine-details" } */
+/* { dg-do compile { target { lp64 && { ! sparc*-*-* } } } } */
+/* 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.  */
+/* { dg-options "-O2 -fdump-rtl-combine-details" } */
 /* { dg-final { scan-rtl-dump "narrow comparison from mode .I to HI" "combine" } } */
 
 typedef __UINT64_TYPE__ uint64_t;
index 23e83372beedb2a59bce30e1e2ef3ea29b8e0a8b..7aa403d76d97a49ef79fbc2979eadff00db6b9cf 100644 (file)
@@ -1,5 +1,7 @@
-/* { dg-do compile { target { lp64 } } } */
-/* { dg-options "-O1 -fdump-rtl-combine-details" } */
+/* { dg-do compile { target { lp64 && { ! sparc*-*-* } } } } */
+/* 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.  */
+/* { dg-options "-O2 -fdump-rtl-combine-details" } */
 /* { dg-final { scan-rtl-dump "narrow comparison from mode .I to HI" "combine" } } */
 
 typedef __UINT64_TYPE__ uint64_t;
index d266896a25e0be8782b9b3ef065f9e28b92cc1b7..4316dcb560503650901d2a39cafe05ba1d4f0818 100644 (file)
@@ -1,5 +1,7 @@
-/* { dg-do compile { target { lp64 } && ! target { sparc*-*-* } } } */
-/* { dg-options "-O1 -fdump-rtl-combine-details" } */
+/* { dg-do compile { target { lp64 && { ! sparc*-*-* } } } } */
+/* Excluding sparc since there a prior optimization already reduced the
+   constant, i.e., nothing left for us.  */
+/* { dg-options "-O2 -fdump-rtl-combine-details" } */
 /* { dg-final { scan-rtl-dump "narrow comparison from mode .I to SI" "combine" } } */
 
 typedef __UINT64_TYPE__ uint64_t;
index 68d7a9d026587cf9e305b0f9c0fb37836a00214a..d9046af79eb6114cda189ae3d71d3c27fb6ad3a7 100644 (file)
@@ -1,5 +1,7 @@
-/* { dg-do compile { target { lp64 } && ! target { sparc*-*-* } } } */
-/* { dg-options "-O1 -fdump-rtl-combine-details" } */
+/* { dg-do compile { target { lp64 && { ! sparc*-*-* } } } } */
+/* Excluding sparc since there a prior optimization already reduced the
+   constant, i.e., nothing left for us.  */
+/* { dg-options "-O2 -fdump-rtl-combine-details" } */
 /* { dg-final { scan-rtl-dump "narrow comparison from mode .I to SI" "combine" } } */
 
 typedef __UINT64_TYPE__ uint64_t;