This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: moving v16sf reg with multiple sub-regs
- From: Richard Sandiford <rsandifo at redhat dot com>
- To: "Dylan Cuthbert" <dylan at q-games dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 23 Feb 2005 14:35:45 +0000
- Subject: Re: moving v16sf reg with multiple sub-regs
- References: <cv7gku$5qu$1@sea.gmane.org>
"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