]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
SH: Fix PR 101177
authorOleg Endo <olegendo@gcc.gnu.org>
Fri, 20 Oct 2023 09:48:34 +0000 (18:48 +0900)
committerOleg Endo <olegendo@gcc.gnu.org>
Fri, 20 Oct 2023 09:48:34 +0000 (18:48 +0900)
Fix accidentally inverted comparison.

gcc/ChangeLog:

PR target/101177
* config/sh/sh.md (unnamed split pattern): Fix comparison of
find_regno_note result.

gcc/config/sh/sh.md

index 484a34fe443837fba813bb7ca432a7a45f9ae0d8..193f40d4419584807369b5d519e49c2fccccdb98 100644 (file)
   if (SUBREG_P (reg))
     reg = SUBREG_REG (reg);
   gcc_assert (REG_P (reg));
-  if (find_regno_note (curr_insn, REG_DEAD, REGNO (reg)) != NULL_RTX)
+  if (find_regno_note (curr_insn, REG_DEAD, REGNO (reg)) == NULL_RTX)
     FAIL;
 
   /* FIXME: Maybe also search the predecessor basic blocks to catch