From: Tom de Vries Date: Wed, 18 May 2011 18:27:11 +0000 (+0000) Subject: re PR middle-end/45098 (Missed induction variable optimization) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b5ee67520324dd4185e13374613b55970cfe5169;p=gcc.git re PR middle-end/45098 (Missed induction variable optimization) 2011-05-18 Tom de Vries PR target/45098 * tree-ssa-loop-ivopts.c (computation_cost): Prevent cost of 0. From-SVN: r173872 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dc2495e9907..624016c4bc0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-05-18 Tom de Vries + + PR target/45098 + * tree-ssa-loop-ivopts.c (computation_cost): Prevent cost of 0. + 2011-05-18 Uros Bizjak * 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 13c2b407cc2..501dbbf4526 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; }