Hi,

As requested in the PR, this patch is a partial backport of r228751.

I can't claim any responsibility for it, but I did take it through the
paces on an aarch64-none-linux-gnu and x86_64-none-linux-gnu bootstrap/
test run and found no issues.

Applied as r230092 on gcc-5-branch (pre-approved in the PR) after checking
that it gives the right results for the code I derived the PR from.

I'll start a test cycle for a 4.9 backport.

Thanks,
James

---
2015-11-09  James Greenhalgh  <james.greenha...@arm.com>

        Partial backport from trunk r228751.
        PR tree-optimization/68238
        2015-10-13  Richard Biener  <rguent...@suse.de>

        * tree-vect-loop.c (vect_estimate_min_profitable_iters): Use
        LOOP_VINFO_COMP_ALIAS_DDRS to estimate alias versioning cost.

diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index 88ef251..05515b5 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -2825,7 +2825,7 @@ vect_estimate_min_profitable_iters (loop_vec_info loop_vinfo,
   if (LOOP_REQUIRES_VERSIONING_FOR_ALIAS (loop_vinfo))
     {
       /*  FIXME: Make cost depend on complexity of individual check.  */
-      unsigned len = LOOP_VINFO_MAY_ALIAS_DDRS (loop_vinfo).length ();
+      unsigned len = LOOP_VINFO_COMP_ALIAS_DDRS (loop_vinfo).length ();
       (void) add_stmt_cost (target_cost_data, len, vector_stmt, NULL, 0,
 			    vect_prologue);
       dump_printf (MSG_NOTE,

Reply via email to