From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xry111.site (xry111.site [89.208.246.23]) by sourceware.org (Postfix) with ESMTPS id 117B03858D33 for ; 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 To: gcc-patches@gcc.gnu.org Cc: chenglulu , i@xen0n.name, xuchenghua@loongson.cn, Xi Ruoyao 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 List-Id: 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 -- 2.42.1