This is the mail archive of the
mailing list for the GCC project.
[Bug tree-optimization/21173] [4.0/4.1 regression] miscompiled pointer subtraction broke Linux kernel
- From: "stevenb at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Apr 2005 09:23:49 -0000
- Subject: [Bug tree-optimization/21173] [4.0/4.1 regression] miscompiled pointer subtraction broke Linux kernel
- References: <firstname.lastname@example.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From stevenb at suse dot de 2005-04-24 09:23 -------
Subject: Re: [4.0/4.1 regression] miscompiled pointer subtraction broke Linux kernel
On Sunday 24 April 2005 05:36, dberlin at dberlin dot org wrote:
> Uh, because it causes things to become non-invariant when they were
> originally invariant (because it will *always* create a new name for
Well, the comment before force_gimple_operand says it should not:
/* Expands EXPR to list of gimple statements STMTS. If SIMPLE is true,
force the result to be either ssa_name or an invariant, otherwise
just force it to be a rhs expression. If VAR is not NULL, make the
base variable of the final destination be VAR if suitable. */
force_gimple_operand (tree expr, tree *stmts, bool simple, tree var)
tree-ssa-pre uses force_gimple_operand with SIMPLE==false, so if
expr is already a valid rhs, force_gimple_operand should do nothing.
If it does, I consider that to be a bug.
Your patch to use unshare_expr is IMHO unnecessarily expensive.