From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by sourceware.org (Postfix) with ESMTP id BB6F33858D1E for ; Wed, 29 Nov 2023 07:45:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BB6F33858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=loongson.cn ARC-Filter: OpenARC Filter v1.0.0 sourceware.org BB6F33858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=114.242.206.163 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701243930; cv=none; b=kC2p/0Y+2wtXoZtYv0FTkOE5ztxoz5/NWOsHg9zLUuHVIti1jwPPtEvNUtFU7ORBRwz/BkS1WR8I+G+Nw2JxX6a9ZFIcdDQI6VaYx4qlmeykJBT/b35IuNfZJGrwYpDZb94NiW7mu7NiPfYKv90OKnXaw3O0jh5oX9uGw1BgsJ4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701243930; c=relaxed/simple; bh=lt3pia9JXKzFI9oKY6Fx7q4N8vu8njqq08W/n/bDHFQ=; h=Subject:To:From:Message-ID:Date:MIME-Version; b=wG/45ZLZgg3Ag14awFPzJdFocRPTWuyEnZryuwYTC3nsOKfR35UZSgkbP8XMG+vzRhl5W2O6/7NsZqG/T/1ROQgWqjgfD6pycIepSjHT7N4F0/jvMBDLQBk7FYwmqcYfuReCVnR84GfBJGlJSPO8kAhEAoRBfwZ1Ajg4VDmOgyA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from loongson.cn (unknown [10.20.4.107]) by gateway (Coremail) with SMTP id _____8CxrusP7GZlx5o9AA--.54073S3; Wed, 29 Nov 2023 15:45:19 +0800 (CST) Received: from [10.20.4.107] (unknown [10.20.4.107]) by localhost.localdomain (Coremail) with SMTP id AQAAf8AxG9wK7GZlKJpPAA--.44763S3; Wed, 29 Nov 2023 15:45:14 +0800 (CST) Subject: Re: Pushed: [PATCH v3 0/5] LoongArch: SIMD fixes and optimizations To: Xi Ruoyao , gcc-patches@gcc.gnu.org Cc: i@xen0n.name, xuchenghua@loongson.cn References: <20231120004728.205167-1-xry111@xry111.site> From: chenglulu Message-ID: Date: Wed, 29 Nov 2023 15:45:14 +0800 User-Agent: Mozilla/5.0 (X11; Linux loongarch64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-CM-TRANSID:AQAAf8AxG9wK7GZlKJpPAA--.44763S3 X-CM-SenderInfo: xfkh0wpoxo3qxorr0wxvrqhubq/ X-Coremail-Antispam: 1Uk129KBj93XoWxJFy5Kw43Aw15tw15Kw13Jrc_yoWrGw47p3 yfCr13tFWUGrs3Grn7Xa45Gry5AF1xW3y293WftFy0yry7Ary2vF48Xr929Fy3G3yrGry2 vw1Duw1Uu3WYv3XCm3ZEXasCq-sJn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUUv2b4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r106r15M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Jr0_JF4l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Jr0_Gr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AK xVW8Jr0_Cr1UM2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6xACxx 1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv 67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IY64vIr41lc7I2V7IY0VAS07 AlzVAYIcxG8wCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02 F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw 1lIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7Cj xVAFwI0_Jr0_Gr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r 1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Jr0_GrUvcSsGvfC2KfnxnUUI43ZEXa7IU8cz VUUUUUU== X-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00,BODY_8BITS,KAM_DMARC_STATUS,KAM_SHORT,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 在 2023/11/29 下午3:12, Xi Ruoyao 写道: > On Mon, 2023-11-20 at 08:47 +0800, Xi Ruoyao wrote: >> The [1/5] patch is the PR112578 fix at >> https://gcc.gnu.org/pipermail/gcc-patches/2023-November/637097.html. >> It has been changed to remove the nearbyint pattern (because nearbyint >> should not raise FE_INEXACT even if -ffp-int-builtin-inexact). >> As other patches depending on the simd.md file introduced by this, sending >> it as the first 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/5] and [3/5] patches make vector product highpart and rotate >> shift operations for GNU vectors and auto vectorization. >> >> The [4/5] patch is a simple code cleanup, with no function change. >> >> The [5/5] patch uses LSX for FP scalar rounding operations if LSX is >> available and -ffp-int-builtin-exact.  We do this because the base FP >> ISA does not have such instructions.  Using LSX is overkill, but still >> much faster than calling libc functions. >> >> Bootstrapped and regtested on loongarch64-linux-gnu.  Ok for trunk? > Pushed r14-5950 .. r14-5954 with minor change: a FSF copyright > disclaimer is added into simd.md in the 1st patch, and an used > match_scratch is removed from 2 in the 5th > patch. > Thank you very much!:-) >> Xi Ruoyao (5): >>   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 >>   LoongArch: Remove lrint_allow_inexact >>   LoongArch: Use LSX for scalar FP rounding with explicit rounding mode >> >>  gcc/config/loongarch/lasx.md                  | 283 ----------------- >>  gcc/config/loongarch/loongarch-builtins.cc    |  52 ++-- >>  gcc/config/loongarch/loongarch.md             |  12 +- >>  gcc/config/loongarch/lsx.md                   | 293 ------------------ >>  gcc/config/loongarch/simd.md                  | 268 ++++++++++++++++ >>  .../loongarch/vect-frint-no-inexact.c         |  48 +++ >>  .../loongarch/vect-frint-scalar-no-inexact.c  |  23 ++ >>  .../gcc.target/loongarch/vect-frint-scalar.c  |  43 +++ >>  .../gcc.target/loongarch/vect-frint.c         |  85 +++++ >>  .../loongarch/vect-ftint-no-inexact.c         |  44 +++ >>  .../gcc.target/loongarch/vect-ftint.c         |  83 +++++ >>  gcc/testsuite/gcc.target/loongarch/vect-muh.c |  36 +++ >>  .../gcc.target/loongarch/vect-rotr.c          |  36 +++ >>  13 files changed, 701 insertions(+), 605 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-scalar-no-inexact.c >>  create mode 100644 gcc/testsuite/gcc.target/loongarch/vect-frint-scalar.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