diff options
author | uweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-08-25 20:10:03 +0000 |
---|---|---|
committer | uweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-08-25 20:10:03 +0000 |
commit | 6b34f88cebeec815bbc406475122954066dde374 (patch) | |
tree | 783886cc026411a84f701166a22f4f10daf751c6 /gcc | |
parent | c10de5e7c4a9a60bfa37f03d03d855452df6a6b9 (diff) | |
download | gcc-6b34f88cebeec815bbc406475122954066dde374.tar.gz |
* combine.c (combine_simplify_rtx): Fix RTL sharing bug.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70778 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/combine.c | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ff2e17591a3..019fca2fa6e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2003-08-25 Ulrich Weigand <uweigand@de.ibm.com> + + * combine.c (combine_simplify_rtx): Fix RTL sharing bug. + 2003-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net> * pretty-print.h (pp_maybe_newline_and_indent): New macro. diff --git a/gcc/combine.c b/gcc/combine.c index 821acb22884..67e4b019567 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -3636,9 +3636,11 @@ combine_simplify_rtx (rtx x, enum machine_mode op0_mode, int last, return x; /* Simplify the alternative arms; this may collapse the true and - false arms to store-flag values. */ - true_rtx = subst (true_rtx, pc_rtx, pc_rtx, 0, 0); - false_rtx = subst (false_rtx, pc_rtx, pc_rtx, 0, 0); + false arms to store-flag values. Be careful to use copy_rtx + here since true_rtx or false_rtx might share RTL with x as a + result of the if_then_else_cond call above. */ + true_rtx = subst (copy_rtx (true_rtx), pc_rtx, pc_rtx, 0, 0); + false_rtx = subst (copy_rtx (false_rtx), pc_rtx, pc_rtx, 0, 0); /* If true_rtx and false_rtx are not general_operands, an if_then_else is unlikely to be simpler. */ |