tree-optimization/98674 - improve dependence analysis
authorRichard Biener <rguenther@suse.de>
Thu, 14 Jan 2021 13:08:41 +0000 (14:08 +0100)
committerRichard Biener <rguenther@suse.de>
Thu, 14 Jan 2021 15:14:01 +0000 (16:14 +0100)
commit2182274f510c180ea92a4f826a0f6cf5f1f55b66
tree9f4b751f8f09cefcbaea037fc522ef5f1fedd89d
parenta512079ef40e442c1269ea1cc55f18790ba68449
tree-optimization/98674 - improve dependence analysis

This improves dependence analysis on refs that access the same
array but with different typed but same sized accesses.  That's
obviously safe for the case of types that cannot have any
access function based off them.  For the testcase this is
signed short vs. unsigned short.

2021-01-14  Richard Biener  <rguenther@suse.de>

PR tree-optimization/98674
* tree-data-ref.c (base_supports_access_fn_components_p): New.
(initialize_data_dependence_relation): For two bases without
possible access fns resort to type size equality when determining
shape compatibility.

* gcc.dg/vect/pr98674.c: New testcase.
gcc/testsuite/gcc.dg/vect/pr98674.c [new file with mode: 0644]
gcc/tree-data-ref.c