Message ID | 20230901054551.1953049-1-lehua.ding@rivai.ai |
---|---|
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c792:0:b0:3f2:4152:657d with SMTP id b18csp683685vqu; Thu, 31 Aug 2023 22:47:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGgfAlPdI9Hbn9tlt6O8K8+L3Q3dir83fTtU6erF+WUW+Rr/G8EaSzY2TqwFybvTTZhqlrC X-Received: by 2002:a17:906:5d:b0:9a1:c991:a514 with SMTP id 29-20020a170906005d00b009a1c991a514mr1087593ejg.63.1693547251604; Thu, 31 Aug 2023 22:47:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693547251; cv=none; d=google.com; s=arc-20160816; b=Jy+52L9V3LOh0atkSIxC7zzaAYfjbZRT4/fiN9y5Xe54hGuoeeGsgNzEdaFIHzmqQJ luim3hsAMhkKEnvy3I/fwUu7RTP8z6lw8K5fK+ODCPw6S9Mu8CijhHR+Lt5Ek0yhTs4T DLNyQiIuwfocZ2CwdcTH3fbD1XiDtUbuqUDl1krOJwBBENtq1zD/8l3QbRcTobCQWUpt 2nHIaQ64rKQnTZcBhOGgxEhOBWJov+nTk4eaOfvHRWVgfK/xv8QDnXM3x0/6AQlvNBzy OS+7WjXsa8cBjzj3Fx0UNurNX+U+FrjO85unAE2Z3Nk3tyzW9pjYNMcPKM6tQfhckeFz pjCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:feedback-id :content-transfer-encoding:mime-version:message-id:date:subject:to :from:dmarc-filter:delivered-to; bh=p2TJ8FPVYhJPv8ECjend+06eqhGV1hN7O+v+rat7rCU=; fh=Hv/nI5qP6O0+cdTY9IQId7SAFjsbOcYYRkS818iLi4E=; b=h7jXxyCL86pAnsExkM7sP2w/7eT21hV+nZpD60VGQCkzKXJ1FEsADEvgBsQ7kaJFXc eYye3ufetz6npvRVr7JD2FUCuacVgmyFOpIkeqr75o72pxFH29F4zsNU5mRu9bs3Es+r 9Y29zpaqXZUydoGHBIY8IL2G6hiVdb/UDf++rTkWPT14Qqdl8q+QJUlWgZzOXxIwV+HV w7MN5unD1NZj3ZZZeha7Oln5ofI1t8b10Bq2MLVJVJTMCu/0DurVASVQhx+Bq+Gonc/s T2tW55fp20ouXPi4TbeE0j3lin8Zd2tZPOWAgX4Sv9FM2BbWFUrkL2PDE5EFkYekhRzQ DAtQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id e25-20020a170906375900b00992acf935aesi1937879ejc.412.2023.08.31.22.47.31 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Aug 2023 22:47:31 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 70664386545A for <ouuuleilei@gmail.com>; Fri, 1 Sep 2023 05:46:34 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtpbgbr2.qq.com (smtpbgbr2.qq.com [54.207.22.56]) by sourceware.org (Postfix) with ESMTPS id 2D6463858436 for <gcc-patches@gcc.gnu.org>; Fri, 1 Sep 2023 05:46:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2D6463858436 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivai.ai Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivai.ai X-QQ-mid: bizesmtp71t1693547152t6j9hd6e Received: from rios-cad121.hadoop.rioslab.org ( [58.60.1.9]) by bizesmtp.qq.com (ESMTP) with id ; Fri, 01 Sep 2023 13:45:51 +0800 (CST) X-QQ-SSF: 01400000000000C0F000000A0000000 X-QQ-FEAT: 3M0okmaRx3glVuIuOhu7tYwg2Co/PUFlwK35hCFpdA/GvQVCQnrYM8lLoW8Mv o+aej1fCAT9+WdgQIa6UfZOyeReDqgQ6EEAsNJnYFQweAnQ29Z+K6NdF+O7XnMkCFW1Bb1e kTh3z9EUp+vVEP9wXYcK+bSsJdctgATz4pxT90yXMN68UC3r7ZceCICQjXDt3kdkzShLOjx 29Uca8r90a+Sx14YTEI2V0eQH7qJh5sDffEDiskEqG/pqbViFWETr1PPLsRUoyd9oovxb8N 1k/9pzKs2E6ggVUcc/jJxzDiciAJLNzssm9+xlaBnOeunW4pkXV0Bo+GBSIXkmBzranBq8L pCQvJCAD7UTPSiy5+R6chDZxKyq2hbyT1RoWCT9OMEfhX27zs67GiHhurEb9yqsE12vxTma X-QQ-GoodBg: 2 X-BIZMAIL-ID: 13550250493278900043 From: Lehua Ding <lehua.ding@rivai.ai> To: gcc-patches@gcc.gnu.org, rdapp.gcc@gmail.com Subject: [PATCH 0/4] Add conditional autovec convert patterns Date: Fri, 1 Sep 2023 13:45:47 +0800 Message-Id: <20230901054551.1953049-1-lehua.ding@rivai.ai> X-Mailer: git-send-email 2.36.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:rivai.ai:qybglogicsvrgz:qybglogicsvrgz6a-0 X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham 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> Cc: kito.cheng@gmail.com, juzhe.zhong@rivai.ai Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1775813002724365600 X-GMAIL-MSGID: 1775813002724365600 |
Series | Add conditional autovec convert patterns | |
Message
Lehua Ding
Sept. 1, 2023, 5:45 a.m. UTC
Hi, these patchs support combining convert_op + vcond_mask to convert_op with mask operand. The method is to keep the vector convert pattern simple (by changing define_expand to define_insn_and_split) until the combine pass and introduce the corresponding pattern to match the pattern after the combine. Best, Lehua Lehua Ding (4): RISC-V: Adjust expand_cond_len_{unary,binop,op} api RISC-V: Add conditional autovec convert(INT<->INT) patterns RISC-V: Add conditional autovec convert(FP<->FP) patterns RISC-V: Add conditional autovec convert(INT<->FP) patterns gcc/config/riscv/autovec-opt.md | 236 ++++++++++++++++++ gcc/config/riscv/autovec.md | 110 ++++---- gcc/config/riscv/riscv-protos.h | 4 +- gcc/config/riscv/riscv-v.cc | 39 +-- .../riscv/rvv/autovec/binop/narrow-3.c | 2 +- .../autovec/cond/cond_convert_float2float-1.h | 29 +++ .../autovec/cond/cond_convert_float2float-2.h | 28 +++ .../cond/cond_convert_float2float-rv32-1.c | 9 + .../cond/cond_convert_float2float-rv32-2.c | 9 + .../cond/cond_convert_float2float-rv64-1.c | 9 + .../cond/cond_convert_float2float-rv64-2.c | 9 + .../cond/cond_convert_float2float_run-1.c | 31 +++ .../cond/cond_convert_float2float_run-2.c | 30 +++ .../autovec/cond/cond_convert_float2int-1.h | 51 ++++ .../autovec/cond/cond_convert_float2int-2.h | 50 ++++ .../cond/cond_convert_float2int-rv32-1.c | 15 ++ .../cond/cond_convert_float2int-rv32-2.c | 15 ++ .../cond/cond_convert_float2int-rv64-1.c | 15 ++ .../cond/cond_convert_float2int-rv64-2.c | 15 ++ .../cond/cond_convert_float2int_run-1.c | 32 +++ .../cond/cond_convert_float2int_run-2.c | 31 +++ .../autovec/cond/cond_convert_int2float-1.h | 45 ++++ .../autovec/cond/cond_convert_int2float-2.h | 44 ++++ .../cond/cond_convert_int2float-rv32-1.c | 13 + .../cond/cond_convert_int2float-rv32-2.c | 13 + .../cond/cond_convert_int2float-rv64-1.c | 13 + .../cond/cond_convert_int2float-rv64-2.c | 13 + .../cond/cond_convert_int2float_run-1.c | 32 +++ .../cond/cond_convert_int2float_run-2.c | 31 +++ .../rvv/autovec/cond/cond_convert_int2int-1.h | 47 ++++ .../rvv/autovec/cond/cond_convert_int2int-2.h | 46 ++++ .../cond/cond_convert_int2int-rv32-1.c | 17 ++ .../cond/cond_convert_int2int-rv32-2.c | 16 ++ .../cond/cond_convert_int2int-rv64-1.c | 16 ++ .../cond/cond_convert_int2int-rv64-2.c | 16 ++ .../autovec/cond/cond_convert_int2int_run-1.c | 31 +++ .../autovec/cond/cond_convert_int2int_run-2.c | 30 +++ 37 files changed, 1124 insertions(+), 68 deletions(-) create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/cond/cond_convert_float2float-1.h create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/cond/cond_convert_float2float-2.h create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/cond/cond_convert_float2float-rv32-1.c create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/cond/cond_convert_float2float-rv32-2.c create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/cond/cond_convert_float2float-rv64-1.c create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/cond/cond_convert_float2float-rv64-2.c create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/cond/cond_convert_float2float_run-1.c create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/cond/cond_convert_float2float_run-2.c create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/cond/cond_convert_float2int-1.h create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/cond/cond_convert_float2int-2.h create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/cond/cond_convert_float2int-rv32-1.c create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/cond/cond_convert_float2int-rv32-2.c create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/cond/cond_convert_float2int-rv64-1.c create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/cond/cond_convert_float2int-rv64-2.c create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/cond/cond_convert_float2int_run-1.c create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/cond/cond_convert_float2int_run-2.c create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/cond/cond_convert_int2float-1.h create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/cond/cond_convert_int2float-2.h create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/cond/cond_convert_int2float-rv32-1.c create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/cond/cond_convert_int2float-rv32-2.c create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/cond/cond_convert_int2float-rv64-1.c create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/cond/cond_convert_int2float-rv64-2.c create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/cond/cond_convert_int2float_run-1.c create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/cond/cond_convert_int2float_run-2.c create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/cond/cond_convert_int2int-1.h create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/cond/cond_convert_int2int-2.h create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/cond/cond_convert_int2int-rv32-1.c create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/cond/cond_convert_int2int-rv32-2.c create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/cond/cond_convert_int2int-rv64-1.c create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/cond/cond_convert_int2int-rv64-2.c create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/cond/cond_convert_int2int_run-1.c create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/cond/cond_convert_int2int_run-2.c