Alternative check for vector refs with same alignment
vect_find_same_alignment_drs uses the ddr dependence distance
to tell whether two references have the same alignment. Although
that's safe with the current code, there's no particular reason
why a dependence distance of 0 should mean that the accesses start
on the same byte. E.g. a reference to a full complex value could
in principle depend on a reference to the imaginary component.
A later patch adds support for this kind of dependence.
On the other side, checking modulo vf is pessimistic when the step
divided by the element size is a factor of 2.
This patch instead looks for cases in which the drs have the same
base, offset and step, and for which the difference in their constant
initial values is a multiple of the alignment.
2017-05-03 Richard Sandiford <richard.sandiford@linaro.org>
gcc/
* tree-vect-data-refs.c (vect_find_same_alignment_drs): Remove
loop_vinfo argument and use of dependence distance vectors.
Check instead whether the two references differ only in their
initial value and assume that they have the same alignment if the
difference is a multiple of the vector alignment.
(vect_analyze_data_refs_alignment): Update call accordingly.
gcc/testsuite/
* gcc.dg/vect/vect-103.c: Update wording of dump message.
From-SVN: r248730