]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix PR124959, gcc.dg/hoist-register-pressure-1.c, *-[23].c, failing
authorHans-Peter Nilsson <hp@axis.com>
Tue, 21 Apr 2026 18:06:49 +0000 (20:06 +0200)
committerHans-Peter Nilsson <hp@gcc.gnu.org>
Wed, 22 Apr 2026 02:18:02 +0000 (04:18 +0200)
These test-cases got typo-corrected in
r16-8316-g630b53cd4ff1c3, which exposed them failing for
cris-elf.  Though, at one time they were passing for the
right reason, and bisection shows they'd start failing when
the CRIS target was CC0-converted, and for the same reason
the S/390 32-bit fails.  See the pre-existing comment in the
test and also see the PR for details, including a suggested
plan how to fix the optimization pass, if someone is
interested in an "easy hack".  Though admittedly, the missed
optimization doesn't affect many targets.

Regarding the target pattern selector expression, I went for
the simplest possible, even though I'm including CRIS in the
64-bit exception.

PR target/124959
* gcc.dg/hoist-register-pressure-1.c,
gcc.dg/hoist-register-pressure-2.c,
gcc.dg/hoist-register-pressure-3.c: Exclude cris-*-*.

gcc/testsuite/gcc.dg/hoist-register-pressure-1.c
gcc/testsuite/gcc.dg/hoist-register-pressure-2.c
gcc/testsuite/gcc.dg/hoist-register-pressure-3.c

index 516357d3c9201602eb5ed0fd906841caf8ea5585..38d19a8914ab6a5b745807da14f32931ffad63ab 100644 (file)
@@ -3,7 +3,7 @@
    be assigned without clobbering cc.  For a PLUS rtx on S/390 this
    requires a load address instruction which is fine on 64 bit but
    cannot be used on 31 bit since it does a 31 bit add only.  */
-/* { dg-final { scan-rtl-dump "PRE/HOIST: end of bb .* copying expression" "hoist" { target { { { ! s390*-*-* } || lp64 } && nonpic } } } } */
+/* { dg-final { scan-rtl-dump "PRE/HOIST: end of bb .* copying expression" "hoist" { target { { { ! { s390*-*-* cris-*-* } } || lp64 } && nonpic } } } } */
 
 #define BUF 100
 long a[BUF];
index 2e1283233788bb26d2233a29aa6b656f289c79b1..d8af93db65323e79a6fee55372cba7efb1f3c438 100644 (file)
@@ -3,7 +3,7 @@
    be assigned without clobbering cc.  For a PLUS rtx on S/390 this
    requires a load address instruction which is fine on 64 bit but
    cannot be used on 31 bit since it does a 31 bit add only.  */
-/* { dg-final { scan-rtl-dump "PRE/HOIST: end of bb .* copying expression" "hoist" { target { { ! s390*-*-* } || lp64 } } } } */
+/* { dg-final { scan-rtl-dump "PRE/HOIST: end of bb .* copying expression" "hoist" { target { { ! { s390*-*-* cris-*-* } } || lp64 } } } } */
 
 #define BUF 100
 long a[BUF];
index 0a705edd79cf38157c454b159c37858bf193f4b1..97b22c6a9691a913f3b0c457a713297a98b65c9b 100644 (file)
@@ -3,7 +3,7 @@
    be assigned without clobbering cc.  For a PLUS rtx on S/390 this
    requires a load address instruction which is fine on 64 bit but
    cannot be used on 31 bit since it does a 31 bit add only.  */
-/* { dg-final { scan-rtl-dump "PRE/HOIST: end of bb .* copying expression" "hoist" { target { { ! s390*-*-* } || lp64 } } } } */
+/* { dg-final { scan-rtl-dump "PRE/HOIST: end of bb .* copying expression" "hoist" { target { { ! { s390*-*-* cris-*-* } } || lp64 } } } } */
 
 #define BUF 100
 long a[BUF];