summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkkojima <kkojima@138bc75d-0d04-0410-961f-82ee72b054a4>2007-05-08 22:22:49 +0000
committerkkojima <kkojima@138bc75d-0d04-0410-961f-82ee72b054a4>2007-05-08 22:22:49 +0000
commit1121ac6fd3429a1a6a31cc627adc05a0b18f644d (patch)
treebbacb408bfa0e6c90376ee5831eee0aa8f6664d4
parentdf3292666239d7ecaa53209dca0dc1d767f2763e (diff)
downloadgcc-1121ac6fd3429a1a6a31cc627adc05a0b18f644d.tar.gz
PR rtl-optimization/28011
* reload.c (push_reload): Set dont_share if IN appears in OUT also when IN is a PLUS rtx. (reg_overlap_mentioned_for_reload_p): Return true if X and IN are same PLUS rtx. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124557 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/reload.c5
2 files changed, 11 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1a9281cac3e..1d0e9055128 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2007-05-08 Kaz Kojima <kkojima@gcc.gnu.org>
+
+ PR rtl-optimization/28011
+ * reload.c (push_reload): Set dont_share if IN appears in OUT
+ also when IN is a PLUS rtx.
+ (reg_overlap_mentioned_for_reload_p): Return true if X and IN
+ are same PLUS rtx.
+
2007-05-08 Kazu Hirata <kazu@codesourcery.com>
* emit-rtl.c (unshare_all_rtl_1): Don't copy DECL_RTL. Don't
diff --git a/gcc/reload.c b/gcc/reload.c
index 8ed2f4b3880..bf220ef6bc0 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -1180,7 +1180,7 @@ push_reload (rtx in, rtx out, rtx *inloc, rtx *outloc,
/* If IN appears in OUT, we can't share any input-only reload for IN. */
if (in != 0 && out != 0 && MEM_P (out)
- && (REG_P (in) || MEM_P (in))
+ && (REG_P (in) || MEM_P (in) || GET_CODE (in) == PLUS)
&& reg_overlap_mentioned_for_reload_p (in, XEXP (out, 0)))
dont_share = 1;
@@ -6516,7 +6516,8 @@ reg_overlap_mentioned_for_reload_p (rtx x, rtx in)
if (REG_P (in))
return 0;
else if (GET_CODE (in) == PLUS)
- return (reg_overlap_mentioned_for_reload_p (x, XEXP (in, 0))
+ return (rtx_equal_p (x, in)
+ || reg_overlap_mentioned_for_reload_p (x, XEXP (in, 0))
|| reg_overlap_mentioned_for_reload_p (x, XEXP (in, 1)));
else return (reg_overlap_mentioned_for_reload_p (XEXP (x, 0), in)
|| reg_overlap_mentioned_for_reload_p (XEXP (x, 1), in));