[Bug tree-optimization/69951] wrong code at -O1 and above on x86_64-linux-gnu
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Feb 25 10:22:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69951
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
CC| |hubicka at gcc dot gnu.org,
| |rguenth at gcc dot gnu.org
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
We have a duplicate for this - basically (most) of alias analysis doesn't
handle aliases (hah).
In this case it's points-to I think and then FRE facing
# p_1 = PHI <&c(2), &b(3)>
*p_1 = 1;
d = 2;
_11 = *p_1;
and optimizing the load to 1. Honza has fixed some cases for GCC 6 but
appearantly not points-to.
See tree-ssa-structalias.c, lookup_vi_for_tree should probably canonicalize
to the ultimate alias. pt_solution_set_var and pt_solution_includes_1
need to be adjusted accordingly as well.
-fno-tree-pta fixes this bug (on trunk).
Honza - I'd need sth like equal_address_to (as used in compare_base_decls)
but "one sided" so that if two decls have the same address they get
canonicalized to the same decl so I can continue to use DECL_UID equality
for the alias check.
More information about the Gcc-bugs
mailing list