This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH GCC]Udate best_cost for start cand if it has lower overall cost in iv set narrowing


On Thu, Jul 9, 2015 at 11:37 AM, Bin Cheng <bin.cheng@arm.com> wrote:
> Hi,
> When I going through the code, I spot this minor issue.  When
> start_cand/orig_cand/third_cand have overall cost in order like "start_cand
> < third_cand < orig_cand", GCC chooses the third_cand instead of start_cand
> because we haven't set best_cost for start_cand.  This is an obvious fix to
> it.
>
> So is it OK?

Ok.  I wonder if you have a testcase which this improves?

Richard.

>
> 2015-07-08  Bin Cheng  <bin.cheng@arm.com>
>
>         * tree-ssa-loop-ivopts.c (iv_ca_narrow): Update best_cost
>         if start candidate has lower cost.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]