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] | |
Hi,
In function vect_object_analysis, when the analyzed memory ref has inner
reference without evolution in the loop, we have to analyze it's initial
condition in the loop (instead of the inner reference itself). Testcase
attached.
Bootstrapped and tested on ppc-darwin.
O.K. for mainline? Should I commit it to 4.0 as well?
Thanks,
Ira
ChangeLog entry:
PR tree-optimization/20122
* tree-vect-analyze.c (vect_object_analysis): Analyze initial
condition of access
function instead of base.
Index: tree-vect-analyze.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-vect-analyze.c,v
retrieving revision 2.4
diff -c -3 -p -r2.4 tree-vect-analyze.c
*** tree-vect-analyze.c 20 Feb 2005 13:47:28 -0000 2.4
--- tree-vect-analyze.c 28 Feb 2005 07:38:01 -0000
*************** vect_object_analysis (tree memref, tree
*** 1654,1663 ****
fprintf (vect_dump, "not vectorized: ptr is loop
invariant.");
return NULL_TREE;
}
! /* Since there exists DR for MEMREF, we are analyzing the base of
! handled component, which not necessary has evolution in the
loop. */
! address_to_analyze = TREE_OPERAND (base, 0);
}
/* 3.3 set data-reference structure for MEMREF. */
--- 1654,1664 ----
fprintf (vect_dump, "not vectorized: ptr is loop
invariant.");
return NULL_TREE;
}
! /* Since there exists DR for MEMREF, we are analyzing the init of
! the access function, which not necessary has evolution in the
loop. */
! address_to_analyze = initial_condition_in_loop_num (access_fn,
! loop->num);
}
/* 3.3 set data-reference structure for MEMREF. */
Testcase:
(See attached file: pr20122.c)Attachment:
pr20122.c
Description: Binary data
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |