This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/33113] Failing to represent the stride (with array) of a dataref when it is not a constant
- From: "sebpop at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Oct 2007 23:43:10 -0000
- Subject: [Bug tree-optimization/33113] Failing to represent the stride (with array) of a dataref when it is not a constant
- References: <bug-33113-6954@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from sebpop at gmail dot com 2007-10-31 23:43 -------
Subject: Re: Failing to represent the stride (with array) of a dataref when it
is not a constant
> > Making us return symbolic stride would not be hard. The problem is that data
> > dependence analysis would fail anyway,
>
True, and the vectorizer has also to be fixed to not consider
INTEGER_CST strides only.
> sometimes (not in this testcases) there won't be a need for dependence testing
> - e.g. a reduction computation where there are no stores, or initialization
> with a constant (i.e. a store and no loads), so there's already a value in
> doing this.
>
This patch would let symbolic non integer_cst steps to be computed,
and stored in DR_STEP:
Index: tree-data-ref.c
===================================================================
--- tree-data-ref.c (revision 129797)
+++ tree-data-ref.c (working copy)
@@ -657,7 +657,7 @@ dr_analyze_innermost (struct data_refere
offset_iv.base = ssize_int (0);
offset_iv.step = ssize_int (0);
}
- else if (!simple_iv (loop, stmt, poffset, &offset_iv, false))
+ else if (!simple_iv (loop, stmt, poffset, &offset_iv, true))
{
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "failed: evolution of offset is not affine.\n");
but the problem is that in the vectorizer, DR_STEP has to be an
INTEGER_CST: for instance,
step = TREE_INT_CST_LOW (DR_STEP (dra));
...
|| tree_int_cst_compare (DR_STEP (dra), DR_STEP (drb)))
and plenty of other places will ICE if we feed them with symbolic
strides.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33113