This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [committed] forward_propagate_subreg vs. mode_rep_extended


On Mon, Dec 19, 2011 at 2:06 PM, Richard Sandiford
<rdsandiford@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.

Thanks,
Andrew Pinski


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]