]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
SH: Fix 101737
authorOleg Endo <olegendo@gcc.gnu.org>
Sun, 3 Mar 2024 05:58:58 +0000 (14:58 +0900)
committerOleg Endo <olegendo@gcc.gnu.org>
Sun, 3 Mar 2024 06:23:20 +0000 (15:23 +0900)
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.

gcc/config/sh/sh.c

index 1564109c9425752f7ceb8e6c7d67910a9d3f8b8b..47aee75efe26c7a936257233963dcec83f1a87a7 100644 (file)
@@ -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);
 }