On Mon, Jul 4, 2011 at 6:28 AM, H.J. Lu <hjl.to...@gmail.com> wrote:
> On Wed, Jun 29, 2011 at 4:19 AM, Richard Guenther <rguent...@suse.de> wrote:
>>
>> The following patch makes us handle invariant loads during vectorization.
>> Dependence analysis currently isn't clever enough to disambiguate them
>> thus we insert versioning-for-alias checks.  For the testcase hoisting
>> the load is still always possible though, and for a read-after-write
>> dependence it would be possible for the vectorized loop copy as the
>> may-aliasing write is varying by the scalar variable size.
>>
>> The existing code for vectorizing invariant accesses looks very
>> suspicious - it generates a vector load at the scalar address
>> to then just extract the first vector element.  Huh.  IMHO this
>> can be simplified as done, by just re-using the scalar load result.
>> But maybe this code was supposed to deal with something entirely
>> different?
>>
>> This patch gives a 33% speedup to the phoronix himeno testcase
>> if you bump the maximum alias versioning checks we want to insert.
>>
>> I'm currently re-bootstrapping & testing this but an earlier version
>> was ok on x86_64-unknown-linux-gnu.
>>
>> 2011-06-29  Richard Guenther  <rguent...@suse.de>
>>
>>        PR tree-optimization/46787
>>        * tree-data-ref.c (dr_address_invariant_p): Remove.
>>        (find_data_references_in_stmt): Invariant accesses are ok now.
>>        * tree-vect-stmts.c (vectorizable_load): Handle invariant
>>        loads.
>>        * tree-vect-data-refs.c (vect_analyze_data_ref_access): Allow
>>        invariant loads.
>>
>>        * gcc.dg/vect/vect-121.c: New testcase.
>>
>
> This also caused:
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49628
>
>

It also caused:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49893


-- 
H.J.

Reply via email to