https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114978

--- Comment #22 from chenglulu <chenglulu at loongson dot cn> ---
(In reply to Xi Ruoyao from comment #21)
> (In reply to chenglulu from comment #19)
> > diff --git a/gcc/config/loongarch/loongarch.cc
> > b/gcc/config/loongarch/loongarch.cc
> > index e7835ae34ae..6a808cb0a5c 100644
> > --- a/gcc/config/loongarch/loongarch.cc
> > +++ b/gcc/config/loongarch/loongarch.cc
> > @@ -2383,7 +2383,7 @@ loongarch_address_insns (rtx x, machine_mode mode,
> > bool might_split_p)
> >         return factor;
> >  
> >        case ADDRESS_REG_REG:
> > -       return factor;
> > +       return factor * 3;
> >  
> >        case ADDRESS_CONST_INT:
> >         return lsx_p ? 0 : factor;
> > 
> > With this patch, -march=la464 has a score of 11.9.
> > However, the specific revision plan has not yet been decided.
> 
> Hmm are ldx and stx really so slow?

I think it's more like it's because LDX/STX uses an extra register.

Reply via email to