On Sun, 2024-02-04 at 11:20 +0800, chenglulu wrote:
> 
> 在 2024/2/3 下午4:58, Xi Ruoyao 写道:
> > We expanded (neg x) to (minus const0 x) for LSX FP vectors, this is
> > wrong because -0.0 is not 0 - 0.0.  This causes some Python tests to
> > fail when Python is built with LSX enabled.
> > 
> > Use the vbitrevi.{d/w} instructions to simply reverse the sign bit
> > instead.  We are already doing this for LASX and now we can unify them
> > into simd.md.
> > 
> > gcc/ChangeLog:
> > 
> >     * config/loongarch/lsx.md (neg<mode:FLSX>2): Remove the
> >     incorrect expand.
> >     * config/loongarch/simd.md (simdfmt_as_i): New define_mode_attr.
> >     (elmsgnbit): Likewise.
> >     (neg<mode:FVEC>2): New define_insn.
> >     * config/loongarch/lasx.md (negv4df2, negv8sf2): Remove as they
> >     are now instantiated in simd.md.
> > ---
> > 
> > Bootstrapped and regtested on loongarch64-linux-gnu.  Ok for trunk?
> 
> LGTM!
> 
> Thanks!

Pushed r14-8785.


-- 
Xi Ruoyao <xry...@xry111.site>
School of Aerospace Science and Technology, Xidian University

Reply via email to