From 45f39d78d6923fbf0462f08918ccae4d80430484 Mon Sep 17 00:00:00 2001
From: Alexandre Oliva <aoliva@redhat.com>
Date: Tue, 2 Jun 2009 08:08:13 +0000
Subject: [PATCH] * combine.c (move_deaths): Compare LUIDs within the same BB
 only.

From-SVN: r148075
---
 gcc/ChangeLog | 4 ++++
 gcc/combine.c | 1 +
 2 files changed, 5 insertions(+)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c84f1a6a4346..9992c733fde3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2009-06-02  Alexandre Oliva  <aoliva@redhat.com>
+
+	* combine.c (move_deaths): Compare LUIDs within the same BB only.
+
 2009-06-02  Alexandre Oliva  <aoliva@redhat.com>
 
 	* common.opt (fdump-unnumbered-links): New.
diff --git a/gcc/combine.c b/gcc/combine.c
index 7cdf396a66cd..0f8b08741435 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -12144,6 +12144,7 @@ move_deaths (rtx x, rtx maybe_kill_insn, int from_luid, rtx to_insn,
 	return;
 
       if (where_dead
+	  && BLOCK_FOR_INSN (where_dead) == BLOCK_FOR_INSN (to_insn)
 	  && DF_INSN_LUID (where_dead) >= from_luid
 	  && DF_INSN_LUID (where_dead) < DF_INSN_LUID (to_insn))
 	{
-- 
GitLab