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-*-*.
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];
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];
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];