aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorBernd Schmidt <bernd.schmidt@codesourcery.com>2010-04-10 12:33:17 +0000
committerBernd Schmidt <bernds@gcc.gnu.org>2010-04-10 12:33:17 +0000
commit52c1d580dd2a0bb42d4abd8cbf58840c2921b28f (patch)
tree5f80af5deffc13e6517de5913c5aed5de181cbbd /gcc
parent4143fd3683c4720401b400cc110f848685d11c09 (diff)
downloadgcc-52c1d580dd2a0bb42d4abd8cbf58840c2921b28f.zip
gcc-52c1d580dd2a0bb42d4abd8cbf58840c2921b28f.tar.gz
gcc-52c1d580dd2a0bb42d4abd8cbf58840c2921b28f.tar.bz2
reload1.c (eliminate_regs_in_insn): Don't restore an operand if doing so would replace the entire pattern.
* reload1.c (eliminate_regs_in_insn): Don't restore an operand if doing so would replace the entire pattern. From-SVN: r158188
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog3
-rw-r--r--gcc/reload1.c5
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5b2f0f0..ed09c30 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -9,6 +9,9 @@
(web_main): Call it.
(union_defs): Don't try to recognize match_dups.
+ * reload1.c (eliminate_regs_in_insn): Don't restore an operand
+ if doing so would replace the entire pattern.
+
2010-04-09 Uros Bizjak <ubizjak@gmail.com>
PR target/43707
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 02fef2d..bd590cb 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -3557,7 +3557,10 @@ eliminate_regs_in_insn (rtx insn, int replace)
{
/* Restore the old body. */
for (i = 0; i < recog_data.n_operands; i++)
- *recog_data.operand_loc[i] = orig_operand[i];
+ /* Restoring a top-level match_parallel would clobber the new_body
+ we installed in the insn. */
+ if (recog_data.operand_loc[i] != &PATTERN (insn))
+ *recog_data.operand_loc[i] = orig_operand[i];
for (i = 0; i < recog_data.n_dups; i++)
*recog_data.dup_loc[i] = orig_operand[(int) recog_data.dup_num[i]];
}