This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/33389] [4.3 Regression] Revision 128239 causes libgomp failure
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Sep 2007 18:26:41 -0000
- Subject: [Bug tree-optimization/33389] [4.3 Regression] Revision 128239 causes libgomp failure
- References: <bug-33389-682@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #20 from jakub at gcc dot gnu dot org 2007-09-12 18:26 -------
append_vuse has:
static inline void
append_vuse (tree var)
{
tree sym;
if (TREE_CODE (var) != SSA_NAME)
{
tree mpt;
var_ann_t ann;
/* If VAR belongs to a memory partition, use it instead of VAR. */
mpt = memory_partition (var);
if (mpt)
var = mpt;
/* Don't allow duplicate entries. */
ann = get_var_ann (var);
if (ann->in_vuse_list || ann->in_vdef_list)
return;
ann->in_vuse_list = true;
sym = var;
}
else
sym = SSA_NAME_VAR (var);
VEC_safe_push (tree, heap, build_vuses, var);
bitmap_set_bit (build_loads, DECL_UID (sym));
}
For VAR_DECL with DECL_HARD_REGISTER set, if it is only in the input list of
asm,
it is added as vuse/load, if it is only in output list of am, it is added as
vdef/store. But the above /* Don't allow duplicate entries. */ means
that if there is "=r" (x) : "r" (x) with VAR_DECL DECL_HARD_REGISTER x, it is
only marked as store/vdef, not as load/vuse.
No matter whether it is right or wrong in tree-ssa-operands.c, I think
sdse should just avoid removing VAR_DECL DECL_HARD_REGISTER store elimination.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33389