* [PATCH] middle-end/115110 - Fix view_converted_memref_p
@ 2024-05-17 9:06 Richard Biener
0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2024-05-17 9:06 UTC (permalink / raw)
To: gcc-patches; +Cc: Jan Hubicka
view_converted_memref_p was checking the reference type against the
pointer type of the offset operand rather than its pointed-to type
which leads to all refs being subject to view-convert treatment
in get_alias_set causing numerous testsuite fails but with its
new uses from r15-512-g9b7cad5884f21c is also a wrong-code issue.
Bootstrap & regtest on x86_64-unknown-linux-gnu in progress.
PR middle-end/115110
* tree-ssa-alias.cc (view_converted_memref_p): Fix.
---
gcc/tree-ssa-alias.cc | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/gcc/tree-ssa-alias.cc b/gcc/tree-ssa-alias.cc
index 9f5f69bcfad..d64d6d02f4a 100644
--- a/gcc/tree-ssa-alias.cc
+++ b/gcc/tree-ssa-alias.cc
@@ -2077,8 +2077,9 @@ view_converted_memref_p (tree base)
{
if (TREE_CODE (base) != MEM_REF && TREE_CODE (base) != TARGET_MEM_REF)
return false;
- return same_type_for_tbaa (TREE_TYPE (base),
- TREE_TYPE (TREE_OPERAND (base, 1))) != 1;
+ return (same_type_for_tbaa (TREE_TYPE (base),
+ TREE_TYPE (TREE_TYPE (TREE_OPERAND (base, 1))))
+ != 1);
}
/* Return true if an indirect reference based on *PTR1 constrained
--
2.35.3
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-05-17 9:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-17 9:06 [PATCH] middle-end/115110 - Fix view_converted_memref_p Richard Biener
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).