This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/43907] yet another missed restrict optimization
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Apr 2010 10:37:24 -0000
- Subject: [Bug middle-end/43907] yet another missed restrict optimization
- References: <bug-43907-18388@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from rguenth at gcc dot gnu dot org 2010-04-27 10:37 -------
Which would be implemented by
Index: gcc/tree-ssa-alias.c
===================================================================
--- gcc/tree-ssa-alias.c (revision 158770)
+++ gcc/tree-ssa-alias.c (working copy)
@@ -211,8 +211,7 @@ ptr_deref_may_alias_decl_p (tree ptr, tr
/* If the decl can be used as a restrict tag and we have a restrict
pointer and that pointers points-to set doesn't contain this decl
then they can't alias. */
- if (DECL_RESTRICTED_P (decl)
- && TYPE_RESTRICT (TREE_TYPE (ptr))
+ if (TYPE_RESTRICT (TREE_TYPE (ptr))
&& pi->pt.vars_contains_restrict)
return bitmap_bit_p (pi->pt.vars, DECL_PT_UID (decl));
checking with ICC it optimizes both testcases.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43907