Jakub Jelinek <ja...@redhat.com> wrote: >On Fri, Dec 13, 2013 at 07:30:12AM +0100, Richard Biener wrote: >> Jakub Jelinek <ja...@redhat.com> wrote: >> >lhs of a call for calls or somewhere in output arguments of inline >asm. >> >> Can you please simply use walk_stmt_load_store_ops to get at the stmt >outputs? > >No, unfortunately. The problem is that >walk_stmt_load_store_{addr_,}ops first >calls and get_base_loadstore on the operand and thus effectively strips >all the >handled components from it.
That's a defficiency of that function then which we should fix, for example with either passing both to the callback or by adding a flag. Richard. But we need to look at any uses of >SSA_NAMEs >in the whole operand, not only if it is based on *MEM_REF with SSA_NAME >operand. I.e., a change of the patch to use walk_stmt_load_store_ops >will keep the pr58956.c testcase fixed, because there is *i, but will >make pr59470.c (the new one in the patch) broken, because there the >SSA_NAME is used as ARRAY_REF index and base is some VAR_DECL. >It guess it wouldn't be hard to make similar testcase even for the call >case, though it is unclear if it would be miscompiled or not. > > Jakub