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 14:58:58 +0900 |
commit | 4ff8ffe7331cf174668cf5c729fd68ff327ab014 (patch) | |
tree | 0009a4300f2cd4929fa2dcd4f2b2daed4555e3e8 | |
parent | 623f52775e677bb3d6e9e7ef97196741dd904b1e (diff) |
SH: Fix 101737
gcc/ChangeLog:
PR target/101737
* config/sh/sh.cc (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.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/config/sh/sh.cc b/gcc/config/sh/sh.cc index 27777c411c3..ef3c2e6791d 100644 --- a/gcc/config/sh/sh.cc +++ b/gcc/config/sh/sh.cc @@ -11767,7 +11767,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); } |