diff options
author | Tom de Vries <tom@codesourcery.com> | 2011-05-18 18:27:11 +0000 |
---|---|---|
committer | Tom de Vries <vries@gcc.gnu.org> | 2011-05-18 18:27:11 +0000 |
commit | b5ee67520324dd4185e13374613b55970cfe5169 (patch) | |
tree | 4913d387d488c627976f2aa1d0e9aa88e85b688a /gcc | |
parent | 5d861bf2cb8d21efd5f87f03150ab8e20f4e1155 (diff) | |
download | gcc-b5ee67520324dd4185e13374613b55970cfe5169.zip gcc-b5ee67520324dd4185e13374613b55970cfe5169.tar.gz gcc-b5ee67520324dd4185e13374613b55970cfe5169.tar.bz2 |
re PR middle-end/45098 (Missed induction variable optimization)
2011-05-18 Tom de Vries <tom@codesourcery.com>
PR target/45098
* tree-ssa-loop-ivopts.c (computation_cost): Prevent cost of 0.
From-SVN: r173872
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/tree-ssa-loop-ivopts.c | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dc2495e..624016c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-05-18 Tom de Vries <tom@codesourcery.com> + + PR target/45098 + * tree-ssa-loop-ivopts.c (computation_cost): Prevent cost of 0. + 2011-05-18 Uros Bizjak <ubizjak@gmail.com> * config/i386/i386.md (*tls_global_dynamic_32_gnu): Split asm template. diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c index 13c2b40..501dbbf 100644 --- a/gcc/tree-ssa-loop-ivopts.c +++ b/gcc/tree-ssa-loop-ivopts.c @@ -2866,6 +2866,8 @@ computation_cost (tree expr, bool speed) if (MEM_P (rslt)) cost += address_cost (XEXP (rslt, 0), TYPE_MODE (type), TYPE_ADDR_SPACE (type), speed); + else if (!REG_P (rslt)) + cost += rtx_cost (rslt, SET, speed); return cost; } |