diff options
author | Zdenek Dvorak <ook@ucw.cz> | 2007-09-08 15:18:49 +0200 |
---|---|---|
committer | Zdenek Dvorak <rakdver@gcc.gnu.org> | 2007-09-08 13:18:49 +0000 |
commit | cbc012d523aa1c819de2909dc00454a226ce0534 (patch) | |
tree | 53f39305ff8de4157e5710fcf6c2b2d0a0f21bb6 /gcc/testsuite/gcc.dg | |
parent | 8fc6f12f498676b90ee96f3488af0c59a74d4905 (diff) | |
download | gcc-cbc012d523aa1c819de2909dc00454a226ce0534.zip gcc-cbc012d523aa1c819de2909dc00454a226ce0534.tar.gz gcc-cbc012d523aa1c819de2909dc00454a226ce0534.tar.bz2 |
re PR rtl-optimization/32283 (Missed induction variable optimization)
PR tree-optimization/32283
* tree-ssa-loop-ivopts.c (may_eliminate_iv): Use
estimated_loop_iterations.
(determine_use_iv_cost_condition): Decrease cost of expressions
used in iv elimination.
* gcc.dg/tree-ssa/loop-31.c: New test.
From-SVN: r128272
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/loop-31.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-31.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-31.c new file mode 100644 index 0000000..cf5843c --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-31.c @@ -0,0 +1,19 @@ +/* PR 32283 */ + +/* { dg-do compile } */ +/* { dg-options "-O1 -fdump-tree-optimized" } */ + +short a[(2048)]; +short foo (int len, int v) +{ + int i; + for (i = 0; i < len; i++) { + a[i] = v; + } + return a[0]; +} + +/* When we do not have addressing mode including multiplication, + the memory access should be strength-reduced. */ +/* { dg-final { scan-tree-dump-times " \\+ 2" 1 "optimized" { target arm-*-* ia64-*-* } } } */ +/* { dg-final { cleanup-tree-dump "optimized" } } */ |