]> git.ipfire.org Git - thirdparty/gcc.git/commit
IBM Z: Fix load-and-test peephole2 condition
authorStefan Schulze Frielinghaus <stefansf@linux.ibm.com>
Fri, 19 Nov 2021 15:56:56 +0000 (16:56 +0100)
committerStefan Schulze Frielinghaus <stefansf@linux.ibm.com>
Mon, 22 Nov 2021 09:19:28 +0000 (10:19 +0100)
commit959b662e0d0b91ac3bd8002f46a8d6c8159ea3b0
treef41b6f9efd7dc457eed2b33b40e16248de08a626
parentc547ab512e3a1e88284004939c2801a71fefa4a0
IBM Z: Fix load-and-test peephole2 condition

For a peephole2 condition variable insn points to the first matched
insn.  In order to refer to the second matched insn use
peep2_next_insn(1) instead.

gcc/ChangeLog:

* config/s390/s390.md (define_peephole2): Variable insn points
to the first matched insn.  Use peep2_next_insn(1) to refer to
the second matched insn.

gcc/testsuite/ChangeLog:

* gcc.target/s390/20211119.c: New test.

(cherry picked from commit f47870e6a272dfe740a38422030c6c68e0fc7ff8)
gcc/config/s390/s390.md
gcc/testsuite/gcc.target/s390/20211119.c [new file with mode: 0644]