On Mon, Aug 8, 2011 at 7:11 PM, Uros Bizjak <ubiz...@gmail.com> wrote:

>> Moves are special as far as reload is concerned.  If there is already
>> a move instruction present *before* reload, it will get fixed up
>> according to its constraints as any other instruction.
>>
>> However, reload will *introduce* new moves as part of its operation,
>> and those will *not* themselves get reloaded.  Instead, reload simply
>> assumes that every plain move will just succeed without requiring
>> any reload; if this is not true, the target *must* provide a
>> secondary reload for this move.
>>
>> (Note that the secondary reload could also work by reloading the
>> target address into a temporary; that's up to the target to
>> implement.)
>
> Whoa, indeed.
>
> Using attached patch that reloads memory address instead of going
> through XMM register, the code for the testcase improves from:

Committed to mainline with following ChangeLog entry:

2011-08-09  Uros Bizjak  <ubiz...@gmail.com>

        PR target/49781
        * config/i386/i386.md (reload_noff_load): New.
        (reload_noff_store): Ditto.
        * config/i386/i386.c (ix86_secondary_reload): Use
        CODE_FOR_reload_noff_load and CODE_FOR_reload_noff_store to handle
        double-word moves from/to non-offsetable addresses instead of
        generating XMM temporary.

Re-bootstrapped and re-tested on x86_64-pc-linux-gnu {,-m32}.

Uros.

Reply via email to