aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAndrew Haley <aph@redhat.com>2005-12-21 16:52:13 +0000
committerAndrew Haley <aph@gcc.gnu.org>2005-12-21 16:52:13 +0000
commiteead060a9971f96ae3dd21fc199f29f542b2e299 (patch)
treebe1a84611d88b154d11e212d84f4f3ee47d83295 /gcc
parent0dd4b47b7fc8c9f9296429d348ec64df5afeb35a (diff)
downloadgcc-eead060a9971f96ae3dd21fc199f29f542b2e299.zip
gcc-eead060a9971f96ae3dd21fc199f29f542b2e299.tar.gz
gcc-eead060a9971f96ae3dd21fc199f29f542b2e299.tar.bz2
re PR middle-end/25121 (libgcj misscompilation?)
2005-12-21 Andrew Haley <aph@redhat.com> PR middle-end/25121 * recog.c (peephole2_optimize): Don't peephole any RTX_FRAME_RELATED_P insns. From-SVN: r108914
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/recog.c14
2 files changed, 18 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 69ca302..7c04dfb 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2005-12-21 Andrew Haley <aph@redhat.com>
+
+ PR middle-end/25121
+ * recog.c (peephole2_optimize): Don't peephole any
+ RTX_FRAME_RELATED_P insns.
+
2005-12-21 Kazu Hirata <kazu@codesourcery.com>
* tree-data-ref.c (estimate_niter_from_size_of_data): Replace
diff --git a/gcc/recog.c b/gcc/recog.c
index 1df4b7f..8a3fe35 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -3104,8 +3104,18 @@ peephole2_optimize (FILE *dump_file ATTRIBUTE_UNUSED)
propagate_one_insn (pbi, insn);
COPY_REG_SET (peep2_insn_data[peep2_current].live_before, live);
- /* Match the peephole. */
- try = peephole2_insns (PATTERN (insn), insn, &match_len);
+ if (RTX_FRAME_RELATED_P (insn))
+ {
+ /* If an insn has RTX_FRAME_RELATED_P set, peephole
+ substitution would lose the
+ REG_FRAME_RELATED_EXPR that is attached. */
+ peep2_current_count = 0;
+ try = NULL;
+ }
+ else
+ /* Match the peephole. */
+ try = peephole2_insns (PATTERN (insn), insn, &match_len);
+
if (try != NULL)
{
/* If we are splitting a CALL_INSN, look for the CALL_INSN