summaryrefslogtreecommitdiffstats
path: root/gcc/gcse.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2007-11-18 19:22:35 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2007-11-18 19:22:35 +0000
commite862ffe0e9972049a82bcd0dfb51e0aae9a83606 (patch)
tree03f1b2b6d8ba6423f0fa37f78cc5e084bee87a35 /gcc/gcse.c
parentbe5cecfdc1ad76fa8b4ef703bcdc5dc5499e2934 (diff)
downloadppe42-gcc-e862ffe0e9972049a82bcd0dfb51e0aae9a83606.tar.gz
ppe42-gcc-e862ffe0e9972049a82bcd0dfb51e0aae9a83606.zip
PR rtl-optimization/34132
* gcse.c (try_replace_reg): Avoid rtx sharing between REG_EQUAL note and insn. * gcc.c-torture/compile/20071118-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130275 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gcse.c')
-rw-r--r--gcc/gcse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/gcse.c b/gcc/gcse.c
index c5e8c7b44f5..84c0994753d 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -2665,7 +2665,8 @@ try_replace_reg (rtx from, rtx to, rtx insn)
with our replacement. */
if (note != 0 && REG_NOTE_KIND (note) == REG_EQUAL)
set_unique_reg_note (insn, REG_EQUAL,
- simplify_replace_rtx (XEXP (note, 0), from, to));
+ simplify_replace_rtx (XEXP (note, 0), from,
+ copy_rtx (to)));
if (!success && set && reg_mentioned_p (from, SET_SRC (set)))
{
/* If above failed and this is a single set, try to simplify the source of
OpenPOWER on IntegriCloud