From patchwork Wed Apr 26 13:06:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Li, Pan2 via Gcc-patches" X-Patchwork-Id: 87861 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp227068vqo; Wed, 26 Apr 2023 06:07:26 -0700 (PDT) X-Google-Smtp-Source: AKy350YnJt1hz8sfjV65JxEtNWbJwdGks30qUEfr9x10KOpc6i9OVECQ/s+c6Y9Y7mAWodO8irUX X-Received: by 2002:a17:906:c416:b0:953:37eb:7727 with SMTP id u22-20020a170906c41600b0095337eb7727mr16617763ejz.43.1682514446219; Wed, 26 Apr 2023 06:07:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682514446; cv=none; d=google.com; s=arc-20160816; b=EqYO2oDbUj9t9SAl+ogPqhIZ9XpSTxiDS4fxEpr7BjkvjNI5C3yg39yNzrs0/w6DZi ElppMGzeliIb5igjT20LGkLIr7f3bB8qXWcK0i4JRK9CU7At+WpRo8VXkUijTAeyivOF CyBmwyqncINn/4EfL82BilKTByyuVqmDq3izWo/823z8Y2zHWdmjh4aGt1iAwEj0b4DZ J1MqrzowiCLrsQ6CBBsQenRGHHDRW02sLN6S87fZp1g8tQ4w3Wmvd+C0k874bcEgljxk w4U4+15jHQlZNptxJD6/9oPnhefWmu6PHV7yQdN18tz3tUrEuRO4rpsTmtVws+hjF1Vn cyVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=fEU/bP0UmflEwNJabQu69a+D6QLDk3hBpDTQLUU9jGc=; b=EqcluItR7WjnlPcTvxNwxf4Kk8Afy7chY6ghQZ3YU2z6gCQUTYPW83PVDmcymxXmI4 wySEZHnU0U9mscRyv1ecmLsCDMpL2UuRHqjd0Rz9tVhHmftjUJtc0BxrcZcsbAbPKoLB dHkgUflbFf5SseAi82TsVE1C3jQvTs2fmXfxde6QcYcNz8pKvRHZ4gHv8URYEAXd4AqP PUGQslWJBKGx/5iAbo7xJpj12cu6MKWyyJV+oK3aNdkENxeR0nrmpcA+smB6Ru8wmi+i uPjCeVv639Fg+CPhsS1r0DH60X3orLbA3m/a9nqSNuc356jMkCH0W2diMOC32SIi64n6 EDbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=OWjDbDzG; 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=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id k25-20020a1709065fd900b0094f5526e460si13005627ejv.432.2023.04.26.06.07.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Apr 2023 06:07:26 -0700 (PDT) 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=@gcc.gnu.org header.s=default header.b=OWjDbDzG; 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=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2407C3858417 for ; Wed, 26 Apr 2023 13:07:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2407C3858417 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1682514445; bh=fEU/bP0UmflEwNJabQu69a+D6QLDk3hBpDTQLUU9jGc=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=OWjDbDzGeCbN+SKQSUK8qrcJzwX6RTSlDB0ZMa/NAeC15p8wjwMG4D/93NWCBvr1E o1ZeOOk4wuLSxuk65rETNhN/kqk5hfig2g230Kwu3CGBjA7xOHOjSq3zpoUWE1CKdo VZ4tw3tXWfPI8kzLi0q0t1hQ9SsTlw2zY+5vuQS4= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by sourceware.org (Postfix) with ESMTPS id 68A7F3858C53 for ; Wed, 26 Apr 2023 13:06:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 68A7F3858C53 X-IronPort-AV: E=McAfee;i="6600,9927,10691"; a="326700666" X-IronPort-AV: E=Sophos;i="5.99,228,1677571200"; d="scan'208";a="326700666" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Apr 2023 06:06:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10691"; a="671335923" X-IronPort-AV: E=Sophos;i="5.99,228,1677571200"; d="scan'208";a="671335923" Received: from shvmail03.sh.intel.com ([10.239.245.20]) by orsmga006.jf.intel.com with ESMTP; 26 Apr 2023 06:06:33 -0700 Received: from yanzhang-dev.sh.intel.com (yanzhang-dev.sh.intel.com [10.239.82.176]) by shvmail03.sh.intel.com (Postfix) with ESMTP id 21B3E1020156; Wed, 26 Apr 2023 21:06:33 +0800 (CST) To: gcc-patches@gcc.gnu.org Cc: juzhe.zhong@rivai.ai, kito.cheng@sifive.com, pan2.li@intel.com, yanzhang.wang@intel.com Subject: [PATCH v2] RISC-V: ICE for vlmul_ext_v intrinsic API Date: Wed, 26 Apr 2023 21:06:02 +0800 Message-Id: <20230426130602.3335312-1-yanzhang.wang@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230426120503.3207041-1-yanzhang.wang@intel.com> References: <20230426120503.3207041-1-yanzhang.wang@intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, SPF_HELO_PASS, SPF_NONE, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: "yanzhang.wang--- via Gcc-patches" From: "Li, Pan2 via Gcc-patches" Reply-To: yanzhang.wang@intel.com Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764240437031363653?= X-GMAIL-MSGID: =?utf-8?q?1764244267582018615?= From: Yanzhang Wang PR 109617 gcc/ChangeLog: * config/riscv/vector-iterators.md: Support VNx2HI and VNX4DI when MIN_VLEN >= 128. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/base/vlmul_ext-1.c: New test. Signed-off-by: Yanzhang Wang Co-authored-by: Pan Li Signed-off-by: Yanzhang Wang --- gcc/config/riscv/vector-iterators.md | 3 ++- .../gcc.target/riscv/rvv/base/vlmul_ext-1.c | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/base/vlmul_ext-1.c diff --git a/gcc/config/riscv/vector-iterators.md b/gcc/config/riscv/vector-iterators.md index a8e856161d3..033659930d1 100644 --- a/gcc/config/riscv/vector-iterators.md +++ b/gcc/config/riscv/vector-iterators.md @@ -189,6 +189,7 @@ (VNx1HI "TARGET_MIN_VLEN < 128") VNx2HI VNx4HI VNx8HI (VNx16HI "TARGET_MIN_VLEN >= 128") (VNx1SI "TARGET_MIN_VLEN < 128") VNx2SI VNx4SI (VNx8SI "TARGET_MIN_VLEN >= 128") (VNx1DI "TARGET_VECTOR_ELEN_64 && TARGET_MIN_VLEN < 128") (VNx2DI "TARGET_VECTOR_ELEN_64") + (VNx4DI "TARGET_VECTOR_ELEN_64") (VNx1SF "TARGET_VECTOR_ELEN_FP_32 && TARGET_MIN_VLEN < 128") (VNx2SF "TARGET_VECTOR_ELEN_FP_32") (VNx4SF "TARGET_VECTOR_ELEN_FP_32") @@ -220,7 +221,7 @@ (define_mode_iterator VLMULEXT32 [ (VNx1QI "TARGET_MIN_VLEN < 128") VNx2QI (VNx4QI "TARGET_MIN_VLEN >= 128") - (VNx1HI "TARGET_MIN_VLEN < 128") + (VNx1HI "TARGET_MIN_VLEN < 128") (VNx2HI "TARGET_MIN_VLEN >= 128") ]) (define_mode_iterator VLMULEXT64 [ diff --git a/gcc/testsuite/gcc.target/riscv/rvv/base/vlmul_ext-1.c b/gcc/testsuite/gcc.target/riscv/rvv/base/vlmul_ext-1.c new file mode 100644 index 00000000000..501d98c5897 --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/rvv/base/vlmul_ext-1.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-options "-march=rv64gcv -mabi=lp64d -O3 -fno-schedule-insns -fno-schedule-insns2" } */ + +#include + +vint16m8_t test_vlmul_ext_v_i16mf4_i16m8(vint16mf4_t op1) { + return __riscv_vlmul_ext_v_i16mf4_i16m8(op1); +} + +vint64m8_t test_vlmul_ext_v_i64m2_i64m8(vint64m2_t op1) { + return __riscv_vlmul_ext_v_i64m2_i64m8(op1); +} + +/* { dg-final { scan-assembler-times {vs8r.v\s+[,\sa-x0-9()]+} 2} } */