aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/loop-2.c5
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/loop-3.c2
-rw-r--r--gcc/tree-ssa-loop-ivopts.c6
5 files changed, 21 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 30c5214..530fefd 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2005-11-13 Zdenek Dvorak <dvorakz@suse.cz>
+
+ * tree-ssa-loop-ivopts.c (get_address_cost): Prevent splitting
+ addressing modes during calculation of costs.
+
2005-11-12 Eric Botcazou <ebotcazou@adacore.com>
* function.c (assign_stack_local_1): Restrict sanity check
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 19a2420..388ea7e 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2005-11-13 Zdenek Dvorak <dvorakz@suse.cz>
+
+ * gcc.dg/tree-ssa/loop-2.c: Fix outcome.
+ * gcc.dg/tree-ssa/loop-3.c: Change type of loop control
+ variable.
+
2005-11-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
testsuite/24614
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-2.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-2.c
index e086499..589de36 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/loop-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-2.c
@@ -34,9 +34,10 @@ void xxx(void)
/* { dg-final { scan-tree-dump-times " \\+ 17" 1 "vars" } } */
/* The induction variable comparison with 99 should be eliminated
- and replaced by comparison of the variable for 17 * iter with 1700. */
+ and replaced by comparison of one of the newly created ivs. */
-/* { dg-final { scan-tree-dump-times "1700" 1 "vars" } } */
/* { dg-final { scan-tree-dump-times "iter" 0 "vars" } } */
+/* { dg-final { scan-tree-dump-times "99" 0 "vars" } } */
+/* { dg-final { scan-tree-dump-times "100" 0 "vars" } } */
/* { dg-final { cleanup-tree-dump "vars" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-3.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-3.c
index 63e582b..82d1d2d 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/loop-3.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-3.c
@@ -11,7 +11,7 @@ int foo(int);
void xxx(void)
{
- int iter;
+ long iter;
for (iter = 0; iter < 100; iter++)
arr_base[iter] = foo (iter);
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index 1235379..4affcf4 100644
--- a/gcc/tree-ssa-loop-ivopts.c
+++ b/gcc/tree-ssa-loop-ivopts.c
@@ -3384,6 +3384,7 @@ get_address_cost (bool symbol_present, bool var_present,
acost = costs[symbol_present][var_present][offset_p][ratio_p];
if (!acost)
{
+ int old_cse_not_expected;
acost = 0;
addr = gen_raw_REG (Pmode, LAST_VIRTUAL_REGISTER + 1);
@@ -3412,7 +3413,12 @@ get_address_cost (bool symbol_present, bool var_present,
addr = gen_rtx_fmt_ee (PLUS, Pmode, addr, base);
start_sequence ();
+ /* To avoid splitting addressing modes, pretend that no cse will
+ follow. */
+ old_cse_not_expected = cse_not_expected;
+ cse_not_expected = true;
addr = memory_address (Pmode, addr);
+ cse_not_expected = old_cse_not_expected;
seq = get_insns ();
end_sequence ();