This is the mail archive of the gcc-cvs@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]

r248730 - in /trunk/gcc: ChangeLog testsuite/Ch...


Author: rsandifo
Date: Wed May 31 12:05:10 2017
New Revision: 248730

URL: https://gcc.gnu.org/viewcvs?rev=248730&root=gcc&view=rev
Log:
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.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/vect/vect-103.c
    trunk/gcc/tree-vect-data-refs.c


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