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]

[patch] Vectorizer: bug fix for multidimensional array support


This patch fixes a bug in the vectorization support for multidimensional
arrays. The vectorizer constructs a reference to the first location that is
accessed in the loop, but does so using wrong index values - the
initial_condition of the access_function of each index should be used,
because the index could be defined in the loop (as demonstrated in the
attached testcase; it needs Devang's "AV - Use distance vector" patch
though to be vectorized).

Bootstrapped and tested on ppc-darwin. O.K. for mainline?

Ira

Changelog entry:

2004-10-12 Ira Rosen <irar@il.ibm.com>

        * tree-vectorizer.c (vect_create_array_access_at_loop_preheader):
        New function.
        (vect_create_addr_base_for_vector_ref): Call
        vect_create_array_access_at_loop_preheader.
        (vect_is_simple_iv_evolution): Call unshare_expr.


Patch:
(See attached file: diff_md.oct12)
Testcase:
(See attached file: vect-81.c)

Attachment: diff_md.oct12
Description: Binary data

Attachment: vect-81.c
Description: Binary data


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