This is the mail archive of the
mailing list for the GCC project.
RE: [PATCH][GCC][AArch64] optimize float immediate moves (2 /4) - HF/DF/SF mode.
> > > + rtx tmp = gen_reg_rtx (SImode);
> > > + aarch64_expand_mov_immediate (tmp, gen_int_mode (ival,
> > > + tmp = simplify_gen_subreg (HImode, tmp, SImode, 0);
> > This looks wrong for big-endian, and...
> > > + emit_move_insn (operands, gen_lowpart (HFmode, tmp));
> > ...either it should be OK to go directly from tmp to the HFmode
> > lowpart, or we should move the HImode temporary into a fresh REG.
> > Current validate_subreg seems to suggest that we need the latter.
> > Isn't it possible to use a HImode move immediate instead of an SImode
> We don't really have a movehi pattern, currently a movhi would end up in
> the general
> mov<mode>_aarch64 pattern which would then use end up using a w
> register as well.
Also aarch64_expand_mov_immediate doesn't allow HImode moves, only SI and DI.
> I'll take a look at big-endian.
> > Thanks,
> > Richard