From: Oleg Endo Date: Sun, 3 Mar 2024 05:58:58 +0000 (+0900) Subject: SH: Fix 101737 X-Git-Tag: releases/gcc-12.4.0~374 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bbae41dc9033d6f0a9f8bc56cc6f80d90286996c;p=thirdparty%2Fgcc.git 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. --- diff --git a/gcc/config/sh/sh.cc b/gcc/config/sh/sh.cc index 03e1c04ec7eb..494e4536251d 100644 --- a/gcc/config/sh/sh.cc +++ b/gcc/config/sh/sh.cc @@ -11766,7 +11766,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); }