Fix PR45199: do not aggregate memory accesses to the same array for -ftree-loop-distr...
authorSebastian Pop <spop@gcc.gnu.org>
Thu, 2 Dec 2010 16:53:16 +0000 (16:53 +0000)
committerSebastian Pop <spop@gcc.gnu.org>
Thu, 2 Dec 2010 16:53:16 +0000 (16:53 +0000)
commit5e37ea0ef1bb8d9a27e6502a82b7b14f30d6d6b6
tree88b1433f2415d2ff73482de80bdbdb30c4c04d7f
parentb2087e8dad076c2482622329023cde67c631edbb
Fix PR45199: do not aggregate memory accesses to the same array for -ftree-loop-distribute-patterns

2010-11-30  Sebastian Pop  <sebastian.pop@amd.com>

PR tree-optimization/45199
* tree-data-ref.c (mem_write_stride_of_same_size_as_unit_type_p): New.
(stores_zero_from_loop): Call
mem_write_stride_of_same_size_as_unit_type_p.
* tree-data-ref.h (stride_of_unit_type_p): New.
* tree-loop-distribution.c (generate_memset_zero): Simplified.
Call stride_of_unit_type_p.
(build_rdg_partition_for_component): Do not call
rdg_flag_similar_memory_accesses when
flag_tree_loop_distribute_patterns is set.

* gcc.dg/tree-ssa/ldist-15.c: New.
* gcc.dg/tree-ssa/ldist-16.c: New.
* gfortran.dg/ldist-pr45199.f: New.

From-SVN: r167380
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/ldist-15.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/ldist-16.c [new file with mode: 0644]
gcc/testsuite/gfortran.dg/ldist-pr45199.f [new file with mode: 0644]
gcc/tree-data-ref.c
gcc/tree-data-ref.h
gcc/tree-loop-distribution.c