Andrew Pinski <pins...@gmail.com> writes:
> On Mon, Dec 19, 2011 at 2:06 PM, Richard Sandiford
> <rdsandif...@googlemail.com> wrote:
>> forward_propagate_subreg has code to optimise sequences like:
>>
>>    (set (reg:DI X) (*_extend:DI (reg:SI Y)))
>>    (... (subreg:SI (reg:DI X)) ...)
>>
>> by replacing (subreg:SI (reg:DI X)) with (reg:SI Y).  However, there is
>> a special case to stop this happening if Y is loaded from memory and the
>> extension matches LOAD_EXTEND_OP.  In that case the transformation isn't
>> profitable, because we'll be converting a single load into a load followed
>> by an extension.
>>
>> The same problem applies to any SI->DI sign extension on 64-bit MIPS,
>> because SI registers are stored in sign-extended form.  The comment
>> below explains why in a bit more detail.
>>
>> This optimisation was causing a failure in gcc.target/mips/octeon-bbit-2.c
>> for -mabi=64.  We reused the input to a sign_extend instruction, such that
>> the inputs and outputs were simultaneously live and could no longer be tied.
>
> This is PR 42839.

Doh.  I really should to search for this stuff in bugzilla first.

I've just added a PR reference to the ChangeLog entry.  I don't think it's
the kind of thing that should be backported to branches, but I'm never
too sure whether that means the bug should be closed as fixed or not.

Richard

Reply via email to