This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix PR46556 (poor address generation)
On Fri, Oct 21, 2011 at 2:22 PM, William J. Schmidt
> On Fri, 2011-10-21 at 11:26 +0200, Richard Guenther wrote:
>> On Tue, Oct 18, 2011 at 4:14 PM, William J. Schmidt
>> <firstname.lastname@example.org> wrote:
>> > +
>> > + ?/* We don't use get_def_for_expr for S1 because TER doesn't forward
>> > + ? ? S1 in some situations where this transform is useful, such as
>> > + ? ? when S1 is the base of two MEM_REFs fitting the pattern. ?*/
>> > + ?s1_stmt = SSA_NAME_DEF_STMT (TREE_OPERAND (exp, 0));
>> You can't do this - this will possibly generate wrong code. ?You _do_
>> have to use get_def_for_expr. ?Or do it when we are still in "true" SSA form...
> OK. ?get_def_for_expr always returns NULL here for the cases I was
> targeting, so doing this in expand isn't going to be helpful.
> Rather than cram this in somewhere else upstream, it might be better to
> just wait and let this case be handled by the new strength reduction
> pass. ?This is one of the easy cases with explicit multiplies in the
> instruction stream, so it shouldn't require any special handling there.
> Seem reasonable?