aboutsummaryrefslogtreecommitdiff
path: root/libjava/classpath/lib
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2025-04-17 10:57:18 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2025-04-17 10:57:18 +0200
commit22fe83d6fc9f59311241c981bcad58b61e2056d4 (patch)
treead63638cbd28b9f0f440cd8b7d65878a053a2c7e /libjava/classpath/lib
parent843b273c6851b71407b116584982b0389be4d6fd (diff)
downloadgcc-22fe83d6fc9f59311241c981bcad58b61e2056d4.zip
gcc-22fe83d6fc9f59311241c981bcad58b61e2056d4.tar.gz
gcc-22fe83d6fc9f59311241c981bcad58b61e2056d4.tar.bz2
s390: Use match_scratch instead of scratch in define_split [PR119834]
The following testcase ICEs since r15-1579 (addition of late combiner), because *clrmem_short can't be split. The problem is that the define_insn uses (use (match_operand 1 "nonmemory_operand" "n,a,a,a")) (use (match_operand 2 "immediate_operand" "X,R,X,X")) (clobber (match_scratch:P 3 "=X,X,X,&a")) and define_split assumed that if operands[1] is const_int_operand, match_scratch will be always scratch, and it will be reg only if it was the last alternative where operands[1] is a reg. The pattern doesn't guarantee it though, of course RA will not try to uselessly assign a reg there if it is not needed, but during RA on the testcase below we match the last alternative, but then comes late combiner and propagates const_int 3 into operands[1]. And that matches fine, match_scratch matches either scratch or reg and the constraint in that case is X for the first variant, so still just fine. But we won't split that because the splitters only expect scratch. The following patch fixes it by using match_scratch instead of scratch, so that it accepts either. 2025-04-17 Jakub Jelinek <jakub@redhat.com> PR target/119834 * config/s390/s390.md (define_split after *cpymem_short): Use (clobber (match_scratch N)) instead of (clobber (scratch)). Use (match_dup 4) and operands[4] instead of (match_dup 3) and operands[3] in the last of those. (define_split after *clrmem_short): Use (clobber (match_scratch N)) instead of (clobber (scratch)). (define_split after *cmpmem_short): Likewise. * g++.target/s390/pr119834.C: New test.
Diffstat (limited to 'libjava/classpath/lib')
0 files changed, 0 insertions, 0 deletions