sched.c (update_flow_info, REG_WAS_0): Ignore if setting insn was deleted.
authorJ"orn Rennecke <amylaar@cygnus.co.uk>
Fri, 13 Feb 1998 12:40:29 +0000 (12:40 +0000)
committerJoern Rennecke <amylaar@gcc.gnu.org>
Fri, 13 Feb 1998 12:40:29 +0000 (12:40 +0000)
* sched.c (update_flow_info, REG_WAS_0): Ignore if setting insn
was deleted.
* haifa-sched.c (update_flow_info, REG_WAS_0): Likewise.

From-SVN: r17963

gcc/ChangeLog
gcc/haifa-sched.c
gcc/sched.c

index 7e9af4d2b19e79c3caef7df73f66ca8d6f5db097..04317ebbd635db9c516c98f2db621b5460e845d4 100644 (file)
@@ -1,3 +1,9 @@
+Fri Feb 13 20:36:05 1998  J"orn Rennecke <amylaar@cygnus.co.uk>
+
+       * sched.c (update_flow_info, REG_WAS_0): Ignore if setting insn
+       was deleted.
+       * haifa-sched.c (update_flow_info, REG_WAS_0): Likewise.
+
 Fri Feb 13 12:18:40 1998  Jeffrey A Law  (law@cygnus.com)
 
        * genextract.c (main): Fix typo.
index b301240dedb06ace09eb380c55ecafa195f51edd..e8f159aa69756c558c900529e84aa3896e16f536 100644 (file)
@@ -7978,6 +7978,14 @@ update_flow_info (notes, first, last, orig_insn)
          break;
 
        case REG_WAS_0:
+         /* If the insn that set the register to 0 was deleted, this
+            note cannot be relied on any longer.  The destination might
+            even have been moved to memory.
+             This was observed for SH4 with execute/920501-6.c compilation,
+            -O2 -fomit-frame-pointer -finline-functions .  */
+         if (GET_CODE (XEXP (note, 0)) == NOTE
+             || INSN_DELETED_P (XEXP (note, 0)))
+           break;
          /* This note applies to the dest of the original insn.  Find the
             first new insn that now has the same dest, and move the note
             there.  */
index b95241be7659b2060164fe2685260e7328c824b2..2fae2d423d1c07c9a9d7d18885a395ecf80ccfbf 100644 (file)
@@ -3854,6 +3854,14 @@ update_flow_info (notes, first, last, orig_insn)
          break;
 
        case REG_WAS_0:
+         /* If the insn that set the register to 0 was deleted, this
+            note cannot be relied on any longer.  The destination might
+            even have been moved to memory.
+             This was observed for SH4 with execute/920501-6.c compilation,
+            -O2 -fomit-frame-pointer -finline-functions .  */
+         if (GET_CODE (XEXP (note, 0)) == NOTE
+             || INSN_DELETED_P (XEXP (note, 0)))
+           break;
          /* This note applies to the dest of the original insn.  Find the
             first new insn that now has the same dest, and move the note
             there.  */