This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/26359] [4.2 Regression] Over optimization of loop when using -ftree-vectorize
- From: "dorit at il dot ibm dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Feb 2006 15:34:07 -0000
- Subject: [Bug tree-optimization/26359] [4.2 Regression] Over optimization of loop when using -ftree-vectorize
- References: <bug-26359-8090@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from dorit at il dot ibm dot com 2006-02-19 15:34 -------
The problem is that during dce the call to is_hidden_global_store returns false
cause the tag is not marked as global/static.
This seems to fix it:
Index: tree-ssa-alias.c
===================================================================
*** tree-ssa-alias.c (revision 110911)
--- tree-ssa-alias.c (working copy)
*************** new_type_alias (tree ptr, tree var)
*** 2638,2643 ****
--- 2638,2651 ----
add_may_alias (tag, al);
}
}
+
+ /* CHECKME:
+ DECL_CONTEXT (tag) = DECL_CONTEXT (var);
+ TREE_PUBLIC (tag) = TREE_PUBLIC (var);
+ TREE_READONLY (tag) = TREE_READONLY (var);
+ */
+ MTAG_GLOBAL (tag) = DECL_EXTERNAL (var);
+ TREE_STATIC (tag) = TREE_STATIC (var);
}
but I don't know if it's the right thing to do in the general case.
--
dorit at il dot ibm dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dorit at il dot ibm dot com,
| |victork at il dot ibm dot
| |com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26359