diff options
author | Oleg Endo <olegendo@gcc.gnu.org> | 2024-03-03 14:58:58 +0900 |
---|---|---|
committer | Oleg Endo <olegendo@gcc.gnu.org> | 2024-03-03 15:23:20 +0900 |
commit | ec65cb598cc6fa126b458cf716438cc3f2404f3c (patch) | |
tree | 268342b23e574ab43e32fe6465939e43ad3a7ac0 | |
parent | 3e60064a03a1a6d38ceb5ca4eb7e1f4d30a8aed1 (diff) |
SH: Fix 101737
gcc/ChangeLog:
PR target/101737
* config/sh/sh.c (sh_is_nott_insn): Handle case where the input
is not an insn, but e.g. a code label.
-rw-r--r-- | gcc/config/sh/sh.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index 1564109c942..47aee75efe2 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -11760,7 +11760,8 @@ sh_insn_operands_modified_between_p (rtx_insn* operands_insn, bool sh_is_nott_insn (const rtx_insn* i) { - return i != NULL && GET_CODE (PATTERN (i)) == SET + return i != NULL_RTX && PATTERN (i) != NULL_RTX + && GET_CODE (PATTERN (i)) == SET && t_reg_operand (XEXP (PATTERN (i), 0), VOIDmode) && negt_reg_operand (XEXP (PATTERN (i), 1), VOIDmode); } |