re PR tree-optimization/63341 (Vectorization miscompilation with -mcpu=power7)
authorJakub Jelinek <jakub@redhat.com>
Thu, 25 Sep 2014 08:12:49 +0000 (10:12 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 25 Sep 2014 08:12:49 +0000 (10:12 +0200)
commit356bbc4c20e346c2a513321b1bc8e9540876e6e0
treed0ec2703a583c945535d901182f41b61cf38fdc2
parentabdc17f81403fa566c44812777296c6d825c3e65
re PR tree-optimization/63341 (Vectorization miscompilation with -mcpu=power7)

PR tree-optimization/63341
* tree-vectorizer.h (vect_create_data_ref_ptr,
vect_create_addr_base_for_vector_ref): Add another tree argument
defaulting to NULL_TREE.
* tree-vect-data-refs.c (vect_create_data_ref_ptr): Add byte_offset
argument, pass it down to vect_create_addr_base_for_vector_ref.
(vect_create_addr_base_for_vector_ref): Add byte_offset argument,
add that to base_offset too if non-NULL.
* tree-vect-stmts.c (vectorizable_load): Add byte_offset variable,
for dr_explicit_realign_optimized set it to vector byte size
- 1 instead of setting offset, pass byte_offset down to
vect_create_data_ref_ptr.

* gcc.dg/vect/pr63341-1.c: New test.
* gcc.dg/vect/pr63341-2.c: New test.

From-SVN: r215583
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/pr63341-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/pr63341-2.c [new file with mode: 0644]
gcc/tree-vect-data-refs.c
gcc/tree-vect-stmts.c
gcc/tree-vectorizer.h