https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125818

--- Comment #6 from Alex Coplan <acoplan at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #4)
> But then gimple_get_lhs (orig_stmt) == gimple_get_lhs (stmt) should have
> been true.  Why does the target unshare the LHS?

I suppose because it uses the lhs twice, once in copy:

gassign *copy = gimple_build_assign (unshare_expr (f.lhs), rhs_tuple);

and again in this COMPONENT_REF:

    tree lhs_array = build3 (COMPONENT_REF, TREE_TYPE (field),
                             f.lhs, field, NULL_TREE);

which ends up in this update stmt:

    gassign *update = gimple_build_assign (lhs_vector, rhs_vector);

and presumably we're not allowed to share tree nodes between different gimple
stmts.

Reply via email to