Make aliasing_component_refs_p to work harder when same_type_for_tbaa returns -1
authorJan Hubicka <hubicka@ucw.cz>
Fri, 7 Jun 2019 08:14:04 +0000 (10:14 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Fri, 7 Jun 2019 08:14:04 +0000 (08:14 +0000)
commit06dd9b3d4e86b2c12ba55144147272ac05eeed40
treebcae61cc6b9edd79728bdaf5e9785f3b7ddba52b
parent6c202d9dc65833e04e35f566c645fde8278c1a24
Make aliasing_component_refs_p to work harder when same_type_for_tbaa returns -1

* tree-ssa-alias.c (aliasing_component_refs_p): Do not give up
immediately after same_types_for_tbaa_p returns -1 and continue
looking for possible exact match; if matching types are arrays
watch for partial overlaps.
(indirect_ref_may_alias_decl_p): Watch for partial array overlaps.
(indirect_refs_may_alias_p): Do type based disambiguation first;
update comment.

* gcc.dg/lto/alias-access-path-2.0.c: New testcase.

From-SVN: r272036
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/lto/alias-access-path-2_0.c [new file with mode: 0644]
gcc/tree-ssa-alias.c