Message ID | 20231119143037.16443-1-xry111@xry111.site |
---|---|
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9910:0:b0:403:3b70:6f57 with SMTP id i16csp1676677vqn; Sun, 19 Nov 2023 06:31:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IF7wzwq3sIT/3K+jfEsJ6uwwoHdVEh1Y4ZkpS73kKsNHrz7D2hdqIbw9i9E5wWrI7g0iy6g X-Received: by 2002:a05:622a:1213:b0:418:194a:f9fe with SMTP id y19-20020a05622a121300b00418194af9femr7069752qtx.62.1700404295675; Sun, 19 Nov 2023 06:31:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1700404295; cv=pass; d=google.com; s=arc-20160816; b=0Ao/6YUrfkLjiGBKqRqB1nagPNLLZlxqy8/FnJZ3GV++Gvx7/whgO2GksyZpHnEOU2 JpKmVF8Zu9dCG8w7BVFF5le4uA+rTqRnUAGeP1yl05grhwh9nFCy4EWshCj3rp9yidvP LmkLBvH436qPSLZe1slJYFJFhwnj5FqDWRaZ+Or/d5NEu5h8DkARGOBojID8vuVm61h4 z1pPY5v/8r6IjMxG3k4HwXLxlYhOyERBUDUfgVrcmpPXDsgk7Tr8LNW/ZiJCzHzomyFJ /oSdaFxtoIGANTKpBW/R4MWvK+4F1+KLaropZiVg7EzrbNBcnEcKfl8Mley/+p0jk5P7 KlPQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=Lz5VNJlvSSGOPffBqRFC1dksFr8JcLo+JjzpBvfIhbQ=; fh=oUCfM/eMlWtMCtZZKY1bglzxCo7b3kw9D5LTFFWuz38=; b=Ym2cV5nlusyynvsLwSv9c1k/9lzzsSGWg1klUOd6SVjB9LqYzhRin2+f9xI8//gCLa UTfhiMuhOSXJHLiyDYPRpbN3nXjbxLzaBygpWBMhhsUbbXECdQRoTfhSSeDa8z70C9VO /JmEANzFOjdeDFb/2t5b66//DA8DqQs7SHoFJVKjGjiffjHmJiCNXsDYaUmne5UUzZ4I SRml06FIW9kXBlz2o6PaGPJU2I26sGhn0vnu+/l+frDCn2/MAbEQk5lYx5OPbXnVaji2 IcxzFozuVLzpoD6xfTyuMc7WzWmwe4ekRcnijs6ffG9JpEWIcpkt2xIDGdzYhMHWMF+m 95ow== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b=YD2VLacr; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=xry111.site Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id z19-20020a05622a029300b0041996c8044dsi5647716qtw.307.2023.11.19.06.31.35 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Nov 2023 06:31:35 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b=YD2VLacr; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=xry111.site Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7488B385841A for <ouuuleilei@gmail.com>; Sun, 19 Nov 2023 14:31:25 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from xry111.site (xry111.site [89.208.246.23]) by sourceware.org (Postfix) with ESMTPS id 117B03858D33 for <gcc-patches@gcc.gnu.org>; Sun, 19 Nov 2023 14:30:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 117B03858D33 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=xry111.site ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 117B03858D33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=89.208.246.23 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700404261; cv=none; b=qoHjEifdp4dId2WoDJHgKvmMCowNCrBOkdHqBGsVci9KvwfT+E6E7UrLrhrNzN+FJ02/8ZdzgbgOHsC21+uyRlt4IlYt2hChvQLNYbNRZz2tm13ZAiCqZ6fnMmo0qSpVvRyqAAcgL4VPGyDZeD0JciD+bhOoFY75kZLiAg/o8KQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700404261; c=relaxed/simple; bh=j41d3N3YlCNKtvc7oVXXjvXizyhveG78DIGG0csks/Y=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=vLdtZmDwATFL8w0VBoaIqyVGPOTVKyJYjVg9xgZMwDFAfKebm3rRjNqR0XhzzMCkH8S7H0TxeSQvZ2WdVSBboa6cklewstUMFYLqI5x+7rUtJ63mkpysu4Cvxy1x8IjAKCdidYt2B+Hn3v7ukDw88Xm/pO2jwSFfyffPCzEAfxU= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1700404255; bh=j41d3N3YlCNKtvc7oVXXjvXizyhveG78DIGG0csks/Y=; h=From:To:Cc:Subject:Date:From; b=YD2VLacr3gQyuBMg/yrH+cyctrjuzfqP99sDwt1agRfAET+gKmvV3UkLowOmJlXv/ Tf3JQh/n9x2sU7EVSDM8HULiLJXbzgNi1lpESDKj4sbKvfUE86AQ/venk4GGfFKs40 WqonUu/d7UsGnehRtGFPL6halgn8woG51Mn9snFU= Received: from stargazer.. (unknown [124.115.222.147]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 056BC66B39; Sun, 19 Nov 2023 09:30:53 -0500 (EST) From: Xi Ruoyao <xry111@xry111.site> To: gcc-patches@gcc.gnu.org Cc: chenglulu <chenglulu@loongson.cn>, i@xen0n.name, xuchenghua@loongson.cn, Xi Ruoyao <xry111@xry111.site> Subject: [PATCH v2 0/3] LoongArch: SIMD fixes and optimizations Date: Sun, 19 Nov 2023 22:30:34 +0800 Message-ID: <20231119143037.16443-1-xry111@xry111.site> X-Mailer: git-send-email 2.42.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_SHORT, LIKELY_SPAM_FROM, RCVD_IN_ABUSEAT, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783003134440605506 X-GMAIL-MSGID: 1783003134440605506 |
Series |
LoongArch: SIMD fixes and optimizations
|
|
Message
Xi Ruoyao
Nov. 19, 2023, 2:30 p.m. UTC
The [1/3] patch is the PR112578 fix at https://gcc.gnu.org/pipermail/gcc-patches/2023-November/637097.html unchanged. As I've made other two patches depending on the simd.md file introduced by it, resend it as a part of this series. As many LASX instructions are only differentiated from the corresponding LSX instruction with operand length, create simd.md file to contain the RTX templates sharable by LSX and LASX. This makes the code cleaner and easier to maintain. The [2/3] and [3/3] patches make vector product highpart and rotate shift operations for GNU vectors and auto vectorization. Bootstrapped and regtested on loongarch64-linux-gnu. Ok for trunk? Xi Ruoyao (3): LoongArch: Fix usage of LSX and LASX frint/ftint instructions [PR112578] LoongArch: Use standard pattern name and RTX code for LSX/LASX muh instructions LoongArch: Use standard pattern name and RTX code for LSX/LASX rotate shift gcc/config/loongarch/lasx.md | 271 ----------------- gcc/config/loongarch/loongarch-builtins.cc | 52 ++-- gcc/config/loongarch/loongarch.md | 7 +- gcc/config/loongarch/lsx.md | 284 ------------------ gcc/config/loongarch/simd.md | 238 +++++++++++++++ .../loongarch/vect-frint-no-inexact.c | 48 +++ .../gcc.target/loongarch/vect-frint.c | 82 +++++ .../loongarch/vect-ftint-no-inexact.c | 44 +++ .../gcc.target/loongarch/vect-ftint.c | 80 +++++ gcc/testsuite/gcc.target/loongarch/vect-muh.c | 36 +++ .../gcc.target/loongarch/vect-rotr.c | 36 +++ 11 files changed, 598 insertions(+), 580 deletions(-) create mode 100644 gcc/config/loongarch/simd.md create mode 100644 gcc/testsuite/gcc.target/loongarch/vect-frint-no-inexact.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vect-frint.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vect-ftint-no-inexact.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vect-ftint.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vect-muh.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vect-rotr.c