diff options
author | Stefan Schulze Frielinghaus <stefansf@linux.ibm.com> | 2021-11-19 16:56:56 +0100 |
---|---|---|
committer | Stefan Schulze Frielinghaus <stefansf@linux.ibm.com> | 2021-11-19 16:56:56 +0100 |
commit | f47870e6a272dfe740a38422030c6c68e0fc7ff8 (patch) | |
tree | 1453130f833e11c6342db96a6b1f8a088991336e /gcc/config/s390 | |
parent | 487d604b6fa0f0a981eadc216d9e481d08ed7e7b (diff) | |
download | gcc-f47870e6a272dfe740a38422030c6c68e0fc7ff8.zip gcc-f47870e6a272dfe740a38422030c6c68e0fc7ff8.tar.gz gcc-f47870e6a272dfe740a38422030c6c68e0fc7ff8.tar.bz2 |
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.
Diffstat (limited to 'gcc/config/s390')
-rw-r--r-- | gcc/config/s390/s390.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md index 4debdcd..c4f92bd 100644 --- a/gcc/config/s390/s390.md +++ b/gcc/config/s390/s390.md @@ -1003,7 +1003,7 @@ (match_operand:GPR 2 "memory_operand")) (set (reg CC_REGNUM) (compare (match_dup 0) (match_operand:GPR 1 "const0_operand")))] - "s390_match_ccmode(insn, CCSmode) && TARGET_EXTIMM + "s390_match_ccmode (peep2_next_insn (1), CCSmode) && TARGET_EXTIMM && GENERAL_REG_P (operands[0]) && satisfies_constraint_T (operands[2]) && !contains_constant_pool_address_p (operands[2])" |