aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeongbae Park <spark@gcc.gnu.org>2007-06-18 20:02:33 +0000
committerSeongbae Park <spark@gcc.gnu.org>2007-06-18 20:02:33 +0000
commitaf4c82ed94434ca16d03b575be97c813c371b3a9 (patch)
tree3d6e05db60195e91246da2e360ad9ca972e4bfba
parent2902c34e51bbb82181104caf213cdf99af1cd8de (diff)
downloadgcc-af4c82ed94434ca16d03b575be97c813c371b3a9.zip
gcc-af4c82ed94434ca16d03b575be97c813c371b3a9.tar.gz
gcc-af4c82ed94434ca16d03b575be97c813c371b3a9.tar.bz2
re PR rtl-optimization/32339 (ICE in insert_save, at caller-save.c:726)
gcc/ChangeLog: 2007-06-18 Seongbae Park <seongbae.park@gmail.com> PR rtl-optimization/32339 * df-scan.c (df_uses_record): Don't modify flags but just add to it for df_ref_record. gcc/testsuite/ChangeLog: 2007-06-18 Martin Michlmayr <tbm@cyrius.com> PR rtl-optimization/32339 * gcc.c-torture/compile/pr32339.c: New test. From-SVN: r125825
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/gcse.c25
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr32339.c17
4 files changed, 42 insertions, 11 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 191d347..606632d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2007-06-18 Seongbae Park <seongbae.park@gmail.com>
+
+ PR rtl-optimization/32339
+ * df-scan.c (df_uses_record): Don't modify flags but just add to
+ it for df_ref_record.
+
2007-06-18 David Daney <ddaney@avtrex.com
Revert:
diff --git a/gcc/gcse.c b/gcc/gcse.c
index 828ee6b..8278714 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -6341,17 +6341,6 @@ replace_store_insn (rtx reg, rtx del, basic_block bb, struct ls_expr *smexpr)
mem = smexpr->pattern;
insn = gen_move_insn (reg, SET_SRC (single_set (del)));
- insn = emit_insn_after (insn, del);
-
- if (dump_file)
- {
- fprintf (dump_file,
- "STORE_MOTION delete insn in BB %d:\n ", bb->index);
- print_inline_rtx (dump_file, del, 6);
- fprintf (dump_file, "\nSTORE MOTION replaced with insn:\n ");
- print_inline_rtx (dump_file, insn, 6);
- fprintf (dump_file, "\n");
- }
for (ptr = ANTIC_STORE_LIST (smexpr); ptr; ptr = XEXP (ptr, 1))
if (XEXP (ptr, 0) == del)
@@ -6379,6 +6368,20 @@ replace_store_insn (rtx reg, rtx del, basic_block bb, struct ls_expr *smexpr)
XEXP (note, 0) = insn;
}
+ /* Emit the insn AFTER all the notes are transferred.
+ This is cheaper since we avoid df rescanning for the note change. */
+ insn = emit_insn_after (insn, del);
+
+ if (dump_file)
+ {
+ fprintf (dump_file,
+ "STORE_MOTION delete insn in BB %d:\n ", bb->index);
+ print_inline_rtx (dump_file, del, 6);
+ fprintf (dump_file, "\nSTORE MOTION replaced with insn:\n ");
+ print_inline_rtx (dump_file, insn, 6);
+ fprintf (dump_file, "\n");
+ }
+
delete_insn (del);
/* Now we must handle REG_EQUAL notes whose contents is equal to the mem;
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 7550286..b864722 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2007-06-18 Martin Michlmayr <tbm@cyrius.com>
+
+ PR rtl-optimization/32339
+ * gcc.c-torture/compile/pr32339.c: New test.
+
2007-06-18 Kenneth Zadeck <zadeck@naturalbridge.com>
* gcc.c-torture/compile/pr32355.c: New testcase.
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr32339.c b/gcc/testsuite/gcc.c-torture/compile/pr32339.c
new file mode 100644
index 0000000..5aca6e4
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr32339.c
@@ -0,0 +1,17 @@
+/* We used to ICE in insert_save at caller-save.c,
+ due to missing REG_DEAD for register use in post-decrement on ia64. */
+struct city_dialog
+{
+ struct city *pcity;
+ char change_list_names[200][200];
+ int change_list_ids[200];
+};
+change_callback (void)
+{
+ struct city_dialog *pdialog;
+ int n;
+ int i;
+ get_city_dialog_production_full (pdialog->change_list_names[n],
+ pdialog->pcity);
+ pdialog->change_list_ids[n++] = i;
+}