public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Xi Ruoyao <xry111@xry111.site>
To: chenglulu <chenglulu@loongson.cn>, gcc-patches@gcc.gnu.org
Cc: i@xen0n.name, xuchenghua@loongson.cn
Subject: Pushed: [PATCH] LoongArch: Fix wrong LSX FP vector negation
Date: Mon, 05 Feb 2024 00:51:33 +0800	[thread overview]
Message-ID: <e152ed633ce6ffed7040dd959056bab6efdb41d7.camel@xry111.site> (raw)
In-Reply-To: <1cd59522-8e76-36c4-d310-2edde394ccb9@loongson.cn>

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 <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

      reply	other threads:[~2024-02-04 16:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-03  8:58 Xi Ruoyao
2024-02-04  3:20 ` chenglulu
2024-02-04 16:51   ` Xi Ruoyao [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e152ed633ce6ffed7040dd959056bab6efdb41d7.camel@xry111.site \
    --to=xry111@xry111.site \
    --cc=chenglulu@loongson.cn \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=i@xen0n.name \
    --cc=xuchenghua@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).