This is the mail archive of the gcc@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: moving v16sf reg with multiple sub-regs


"Dylan Cuthbert" <dylan@q-games.com> writes:
>    emit_move_insn( gen_rtx_SUBREG (V4SFmode, op0, 0  ), gen_rtx_MEM(
> V4SFmode, src_reg ) );
>    emit_move_insn( gen_rtx_SUBREG (V4SFmode, op0, 16 ), gen_rtx_MEM(
> V4SFmode, plus_constant( src_reg, 16 ) ) );
>    emit_move_insn( gen_rtx_SUBREG (V4SFmode, op0, 32 ), gen_rtx_MEM(
> V4SFmode, plus_constant( src_reg, 32 ) ) );
>    emit_move_insn( gen_rtx_SUBREG (V4SFmode, op0, 48 ), gen_rtx_MEM(
> V4SFmode, plus_constant( src_reg, 48 ) ) );

Note that generating MEMs like this is a bad idea because it discards
alias information.  It's better to use functions like adjust_address
instead.

It's probably also better to use simplify_gen_subreg instead of
gen_rtx_SUBREG.

Richard


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