[Bug tree-optimization/22591] [4.0/4.1 Regression] wrong alias information causes an incorrect redundant load elimination
dnovillo at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue Jul 26 16:19:00 GMT 2005
------- Additional Comments From dnovillo at gcc dot gnu dot org 2005-07-26 16:19 -------
Testing patch. The shortcut we were taking in may_alias_p is invalid even with
strict aliasing.
--- tree-ssa-alias.c 25 Jul 2005 12:04:50 -0000 2.107
+++ tree-ssa-alias.c 26 Jul 2005 16:16:34 -0000
@@ -1511,23 +1511,6 @@ may_alias_p (tree ptr, HOST_WIDE_INT mem
alias_stats.tbaa_queries++;
- /* If VAR is a pointer with the same alias set as PTR, then dereferencing
- PTR can't possibly affect VAR. Note, that we are specifically testing
- for PTR's alias set here, not its pointed-to type. We also can't
- do this check with relaxed aliasing enabled. */
- if (POINTER_TYPE_P (TREE_TYPE (var))
- && var_alias_set != 0
- && mem_alias_set != 0)
- {
- HOST_WIDE_INT ptr_alias_set = get_alias_set (ptr);
- if (ptr_alias_set == var_alias_set)
- {
- alias_stats.alias_noalias++;
- alias_stats.tbaa_resolved++;
- return false;
- }
- }
-
/* If the alias sets don't conflict then MEM cannot alias VAR. */
if (!alias_sets_conflict_p (mem_alias_set, var_alias_set))
{
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22591
More information about the Gcc-bugs
mailing list