From patchwork Fri Apr 28 02:46:41 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: 88436 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp660108vqo; Thu, 27 Apr 2023 19:47:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4gBfTDJzMsEOSrDOYA1LIYtKqn9vU7fgFkfppxWfZ+Kqxb+SOK4F1BdtMkdnNxN/52qt4a X-Received: by 2002:a17:907:3f9e:b0:94e:c142:df98 with SMTP id hr30-20020a1709073f9e00b0094ec142df98mr3522046ejc.60.1682650062647; Thu, 27 Apr 2023 19:47:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682650062; cv=none; d=google.com; s=arc-20160816; b=SrZS2HYbxdRfEPvZAPedO71ynx8iVXsqbVZTF0/zE1mkmVhTeVwT4w5CFInoqqlOqw YZrC3vXt3vK4b99yT2Khvbv5BZf9S/A/Yuy1VAAQuvfY1XsryNOvrR1TNoOcBrLwWebZ hFr3A/AO5NAE90ls427c90/hhl6o8NlUZj985EBgM4ZNwNDBr4GQ1VJh+cMjGaK9ycLX lSPqTqUSaZuYg+PNU9N4fzg2+b+VaI0YFlrJQ1FtFFyJ6zR5PG2SDvAhkEolEBTejnqv WsTNGJi2FYoNL8csr2sxQSKoNwE0oedbeFRqmhmoH6eWX96w6DOhQY5IebOLhZQuWSq0 WRYA== 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=ku+Yzbcfv1ZJyh6JPoMRtINVxyZfi2ZfuzQk1AbGk7Y=; b=aUjWL2R6IdV6VC++37PRGCDZpewLbun4s5bYg0TNNTHhkT/vq9l1RVDLDDfpAZFQC2 jQ0QO81BuF3wz0vOhPDJmzHGr047frIDJZWrXXeitKIaOqWZAzA8873ArcaXFG9Lrdec EkvFIvukk7ZK7D+TsL120+P+pRZGsKvEh8dRDqbHtvS6WkQumb/zvJiiYmj9qoM6cadU 5lW6fkNdgmsGjFd5umfkSCrLAIrGuofYJ2c34XPgPu4F+gk7z8pXMm+zWSr6TkHvOEUD 2+rI9x/mkGzuxAkULiNf3GNVbGEVvWnRv/XJTzkCIE7WTHprmVi+4t8rpqw7dAKJ8q8d 2rqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=UHMdWXAz; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id lf13-20020a170907174d00b0094f9af0b96esi13693137ejc.681.2023.04.27.19.47.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Apr 2023 19:47:42 -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; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=UHMdWXAz; 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"; 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 2F6D93858C66 for ; Fri, 28 Apr 2023 02:47:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2F6D93858C66 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1682650061; bh=ku+Yzbcfv1ZJyh6JPoMRtINVxyZfi2ZfuzQk1AbGk7Y=; 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=UHMdWXAz0ocRzqPsTGJPx24ltk4YZZ9J0dg+jGRmA1pkPICapfrBsEQttf2VYkqV7 62rFkleuJqcoRBXw+2/N3KFzLub/99o+clepoltS+doZw+5gwdK9yZU3VNTAdkxcOP fjfKESFR4D7WavRVZpzc5tEooIM7GW8U8v6sxe9U= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by sourceware.org (Postfix) with ESMTPS id 8E18D3858D37 for ; Fri, 28 Apr 2023 02:46:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8E18D3858D37 X-IronPort-AV: E=McAfee;i="6600,9927,10693"; a="350536994" X-IronPort-AV: E=Sophos;i="5.99,233,1677571200"; d="scan'208";a="350536994" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Apr 2023 19:46:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10693"; a="697356199" X-IronPort-AV: E=Sophos;i="5.99,233,1677571200"; d="scan'208";a="697356199" Received: from shvmail03.sh.intel.com ([10.239.245.20]) by fmsmga007.fm.intel.com with ESMTP; 27 Apr 2023 19:46:43 -0700 Received: from pli-ubuntu.sh.intel.com (pli-ubuntu.sh.intel.com [10.239.159.47]) by shvmail03.sh.intel.com (Postfix) with ESMTP id 42ED1100780D; Fri, 28 Apr 2023 10:46:42 +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: Allow RVV VMS{Compare}(V1, V1) simplify to VMCLR Date: Fri, 28 Apr 2023 10:46:41 +0800 Message-Id: <20230428024641.3757002-1-pan2.li@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230427143005.1781966-1-pan2.li@intel.com> References: <20230427143005.1781966-1-pan2.li@intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_ASCII_DIVIDERS, KAM_SHORT, SPF_HELO_NONE, 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: Pan Li via Gcc-patches From: "Li, Pan2 via Gcc-patches" Reply-To: pan2.li@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?1764340175866824896?= X-GMAIL-MSGID: =?utf-8?q?1764386472090421632?= From: Pan Li When some RVV integer compare operators act on the same vector registers without mask. They can be simplified to VMCLR. This PATCH allow the ne, lt, ltu, gt, gtu to perform such kind of the simplification by adding one new define_split. Given we have: vbool1_t test_shortcut_for_riscv_vmslt_case_0(vint8m8_t v1, size_t vl) { return __riscv_vmslt_vv_i8m8_b1(v1, v1, vl); } Before this patch: vsetvli zero,a2,e8,m8,ta,ma vl8re8.v v24,0(a1) vmslt.vv v8,v24,v24 vsetvli a5,zero,e8,m8,ta,ma vsm.v v8,0(a0) ret After this patch: vsetvli zero,a2,e8,mf8,ta,ma vmclr.m v24 <- optimized to vmclr.m vsetvli zero,a5,e8,mf8,ta,ma vsm.v v24,0(a0) ret As above, we may have one instruction eliminated and require less vector registers. gcc/ChangeLog: * config/riscv/vector.md: Add new define split to perform the simplification. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/base/integer_compare_insn_shortcut.c: New test. Signed-off-by: Pan Li Co-authored-by: kito-cheng --- gcc/config/riscv/vector.md | 32 ++ .../rvv/base/integer_compare_insn_shortcut.c | 291 ++++++++++++++++++ 2 files changed, 323 insertions(+) create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/base/integer_compare_insn_shortcut.c diff --git a/gcc/config/riscv/vector.md b/gcc/config/riscv/vector.md index b3d23441679..1642822d098 100644 --- a/gcc/config/riscv/vector.md +++ b/gcc/config/riscv/vector.md @@ -7689,3 +7689,35 @@ (define_insn "@pred_fault_load" "vleff.v\t%0,%3%p1" [(set_attr "type" "vldff") (set_attr "mode" "")]) + +;; ----------------------------------------------------------------------------- +;; ---- Integer Compare Instructions Simplification +;; ----------------------------------------------------------------------------- +;; Simplify to VMCLR.m Includes: +;; - 1. VMSNE +;; - 2. VMSLT +;; - 3. VMSLTU +;; - 4. VMSGT +;; - 5. VMSGTU +;; ----------------------------------------------------------------------------- +(define_split + [(set (match_operand:VB 0 "register_operand") + (if_then_else:VB + (unspec:VB + [(match_operand:VB 1 "vector_all_trues_mask_operand") + (match_operand 4 "vector_length_operand") + (match_operand 5 "const_int_operand") + (match_operand 6 "const_int_operand") + (reg:SI VL_REGNUM) + (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE) + (match_operand:VB 3 "vector_move_operand") + (match_operand:VB 2 "vector_undef_operand")))] + "TARGET_VECTOR" + [(const_int 0)] + { + emit_insn (gen_pred_mov (mode, operands[0], CONST1_RTX (mode), + RVV_VUNDEF (mode), operands[3], + operands[4], operands[5])); + DONE; + } +) diff --git a/gcc/testsuite/gcc.target/riscv/rvv/base/integer_compare_insn_shortcut.c b/gcc/testsuite/gcc.target/riscv/rvv/base/integer_compare_insn_shortcut.c new file mode 100644 index 00000000000..8954adad09d --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/rvv/base/integer_compare_insn_shortcut.c @@ -0,0 +1,291 @@ +/* { dg-do compile } */ +/* { dg-options "-march=rv64gcv -mabi=lp64 -O3" } */ + +#include "riscv_vector.h" + +vbool1_t test_shortcut_for_riscv_vmseq_case_0(vint8m8_t v1, size_t vl) { + return __riscv_vmseq_vv_i8m8_b1(v1, v1, vl); +} + +vbool2_t test_shortcut_for_riscv_vmseq_case_1(vint8m4_t v1, size_t vl) { + return __riscv_vmseq_vv_i8m4_b2(v1, v1, vl); +} + +vbool4_t test_shortcut_for_riscv_vmseq_case_2(vint8m2_t v1, size_t vl) { + return __riscv_vmseq_vv_i8m2_b4(v1, v1, vl); +} + +vbool8_t test_shortcut_for_riscv_vmseq_case_3(vint8m1_t v1, size_t vl) { + return __riscv_vmseq_vv_i8m1_b8(v1, v1, vl); +} + +vbool16_t test_shortcut_for_riscv_vmseq_case_4(vint8mf2_t v1, size_t vl) { + return __riscv_vmseq_vv_i8mf2_b16(v1, v1, vl); +} + +vbool32_t test_shortcut_for_riscv_vmseq_case_5(vint8mf4_t v1, size_t vl) { + return __riscv_vmseq_vv_i8mf4_b32(v1, v1, vl); +} + +vbool64_t test_shortcut_for_riscv_vmseq_case_6(vint8mf8_t v1, size_t vl) { + return __riscv_vmseq_vv_i8mf8_b64(v1, v1, vl); +} + +vbool1_t test_shortcut_for_riscv_vmsne_case_0(vint8m8_t v1, size_t vl) { + return __riscv_vmsne_vv_i8m8_b1(v1, v1, vl); +} + +vbool2_t test_shortcut_for_riscv_vmsne_case_1(vint8m4_t v1, size_t vl) { + return __riscv_vmsne_vv_i8m4_b2(v1, v1, vl); +} + +vbool4_t test_shortcut_for_riscv_vmsne_case_2(vint8m2_t v1, size_t vl) { + return __riscv_vmsne_vv_i8m2_b4(v1, v1, vl); +} + +vbool8_t test_shortcut_for_riscv_vmsne_case_3(vint8m1_t v1, size_t vl) { + return __riscv_vmsne_vv_i8m1_b8(v1, v1, vl); +} + +vbool16_t test_shortcut_for_riscv_vmsne_case_4(vint8mf2_t v1, size_t vl) { + return __riscv_vmsne_vv_i8mf2_b16(v1, v1, vl); +} + +vbool32_t test_shortcut_for_riscv_vmsne_case_5(vint8mf4_t v1, size_t vl) { + return __riscv_vmsne_vv_i8mf4_b32(v1, v1, vl); +} + +vbool64_t test_shortcut_for_riscv_vmsne_case_6(vint8mf8_t v1, size_t vl) { + return __riscv_vmsne_vv_i8mf8_b64(v1, v1, vl); +} + +vbool1_t test_shortcut_for_riscv_vmslt_case_0(vint8m8_t v1, size_t vl) { + return __riscv_vmslt_vv_i8m8_b1(v1, v1, vl); +} + +vbool2_t test_shortcut_for_riscv_vmslt_case_1(vint8m4_t v1, size_t vl) { + return __riscv_vmslt_vv_i8m4_b2(v1, v1, vl); +} + +vbool4_t test_shortcut_for_riscv_vmslt_case_2(vint8m2_t v1, size_t vl) { + return __riscv_vmslt_vv_i8m2_b4(v1, v1, vl); +} + +vbool8_t test_shortcut_for_riscv_vmslt_case_3(vint8m1_t v1, size_t vl) { + return __riscv_vmslt_vv_i8m1_b8(v1, v1, vl); +} + +vbool16_t test_shortcut_for_riscv_vmslt_case_4(vint8mf2_t v1, size_t vl) { + return __riscv_vmslt_vv_i8mf2_b16(v1, v1, vl); +} + +vbool32_t test_shortcut_for_riscv_vmslt_case_5(vint8mf4_t v1, size_t vl) { + return __riscv_vmslt_vv_i8mf4_b32(v1, v1, vl); +} + +vbool64_t test_shortcut_for_riscv_vmslt_case_6(vint8mf8_t v1, size_t vl) { + return __riscv_vmslt_vv_i8mf8_b64(v1, v1, vl); +} + +vbool1_t test_shortcut_for_riscv_vmsltu_case_0(vuint8m8_t v1, size_t vl) { + return __riscv_vmsltu_vv_u8m8_b1(v1, v1, vl); +} + +vbool2_t test_shortcut_for_riscv_vmsltu_case_1(vuint8m4_t v1, size_t vl) { + return __riscv_vmsltu_vv_u8m4_b2(v1, v1, vl); +} + +vbool4_t test_shortcut_for_riscv_vmsltu_case_2(vuint8m2_t v1, size_t vl) { + return __riscv_vmsltu_vv_u8m2_b4(v1, v1, vl); +} + +vbool8_t test_shortcut_for_riscv_vmsltu_case_3(vuint8m1_t v1, size_t vl) { + return __riscv_vmsltu_vv_u8m1_b8(v1, v1, vl); +} + +vbool16_t test_shortcut_for_riscv_vmsltu_case_4(vuint8mf2_t v1, size_t vl) { + return __riscv_vmsltu_vv_u8mf2_b16(v1, v1, vl); +} + +vbool32_t test_shortcut_for_riscv_vmsltu_case_5(vuint8mf4_t v1, size_t vl) { + return __riscv_vmsltu_vv_u8mf4_b32(v1, v1, vl); +} + +vbool64_t test_shortcut_for_riscv_vmsltu_case_6(vuint8mf8_t v1, size_t vl) { + return __riscv_vmsltu_vv_u8mf8_b64(v1, v1, vl); +} + +vbool1_t test_shortcut_for_riscv_vmsle_case_0(vint8m8_t v1, size_t vl) { + return __riscv_vmsle_vv_i8m8_b1(v1, v1, vl); +} + +vbool2_t test_shortcut_for_riscv_vmsle_case_1(vint8m4_t v1, size_t vl) { + return __riscv_vmsle_vv_i8m4_b2(v1, v1, vl); +} + +vbool4_t test_shortcut_for_riscv_vmsle_case_2(vint8m2_t v1, size_t vl) { + return __riscv_vmsle_vv_i8m2_b4(v1, v1, vl); +} + +vbool8_t test_shortcut_for_riscv_vmsle_case_3(vint8m1_t v1, size_t vl) { + return __riscv_vmsle_vv_i8m1_b8(v1, v1, vl); +} + +vbool16_t test_shortcut_for_riscv_vmsle_case_4(vint8mf2_t v1, size_t vl) { + return __riscv_vmsle_vv_i8mf2_b16(v1, v1, vl); +} + +vbool32_t test_shortcut_for_riscv_vmsle_case_5(vint8mf4_t v1, size_t vl) { + return __riscv_vmsle_vv_i8mf4_b32(v1, v1, vl); +} + +vbool64_t test_shortcut_for_riscv_vmsle_case_6(vint8mf8_t v1, size_t vl) { + return __riscv_vmsle_vv_i8mf8_b64(v1, v1, vl); +} + +vbool1_t test_shortcut_for_riscv_vmsleu_case_0(vuint8m8_t v1, size_t vl) { + return __riscv_vmsleu_vv_u8m8_b1(v1, v1, vl); +} + +vbool2_t test_shortcut_for_riscv_vmsleu_case_1(vuint8m4_t v1, size_t vl) { + return __riscv_vmsleu_vv_u8m4_b2(v1, v1, vl); +} + +vbool4_t test_shortcut_for_riscv_vmsleu_case_2(vuint8m2_t v1, size_t vl) { + return __riscv_vmsleu_vv_u8m2_b4(v1, v1, vl); +} + +vbool8_t test_shortcut_for_riscv_vmsleu_case_3(vuint8m1_t v1, size_t vl) { + return __riscv_vmsleu_vv_u8m1_b8(v1, v1, vl); +} + +vbool16_t test_shortcut_for_riscv_vmsleu_case_4(vuint8mf2_t v1, size_t vl) { + return __riscv_vmsleu_vv_u8mf2_b16(v1, v1, vl); +} + +vbool32_t test_shortcut_for_riscv_vmsleu_case_5(vuint8mf4_t v1, size_t vl) { + return __riscv_vmsleu_vv_u8mf4_b32(v1, v1, vl); +} + +vbool64_t test_shortcut_for_riscv_vmsleu_case_6(vuint8mf8_t v1, size_t vl) { + return __riscv_vmsleu_vv_u8mf8_b64(v1, v1, vl); +} + +vbool1_t test_shortcut_for_riscv_vmsgt_case_0(vint8m8_t v1, size_t vl) { + return __riscv_vmsgt_vv_i8m8_b1(v1, v1, vl); +} + +vbool2_t test_shortcut_for_riscv_vmsgt_case_1(vint8m4_t v1, size_t vl) { + return __riscv_vmsgt_vv_i8m4_b2(v1, v1, vl); +} + +vbool4_t test_shortcut_for_riscv_vmsgt_case_2(vint8m2_t v1, size_t vl) { + return __riscv_vmsgt_vv_i8m2_b4(v1, v1, vl); +} + +vbool8_t test_shortcut_for_riscv_vmsgt_case_3(vint8m1_t v1, size_t vl) { + return __riscv_vmsgt_vv_i8m1_b8(v1, v1, vl); +} + +vbool16_t test_shortcut_for_riscv_vmsgt_case_4(vint8mf2_t v1, size_t vl) { + return __riscv_vmsgt_vv_i8mf2_b16(v1, v1, vl); +} + +vbool32_t test_shortcut_for_riscv_vmsgt_case_5(vint8mf4_t v1, size_t vl) { + return __riscv_vmsgt_vv_i8mf4_b32(v1, v1, vl); +} + +vbool64_t test_shortcut_for_riscv_vmsgt_case_6(vint8mf8_t v1, size_t vl) { + return __riscv_vmsgt_vv_i8mf8_b64(v1, v1, vl); +} + +vbool1_t test_shortcut_for_riscv_vmsgtu_case_0(vuint8m8_t v1, size_t vl) { + return __riscv_vmsgtu_vv_u8m8_b1(v1, v1, vl); +} + +vbool2_t test_shortcut_for_riscv_vmsgtu_case_1(vuint8m4_t v1, size_t vl) { + return __riscv_vmsgtu_vv_u8m4_b2(v1, v1, vl); +} + +vbool4_t test_shortcut_for_riscv_vmsgtu_case_2(vuint8m2_t v1, size_t vl) { + return __riscv_vmsgtu_vv_u8m2_b4(v1, v1, vl); +} + +vbool8_t test_shortcut_for_riscv_vmsgtu_case_3(vuint8m1_t v1, size_t vl) { + return __riscv_vmsgtu_vv_u8m1_b8(v1, v1, vl); +} + +vbool16_t test_shortcut_for_riscv_vmsgtu_case_4(vuint8mf2_t v1, size_t vl) { + return __riscv_vmsgtu_vv_u8mf2_b16(v1, v1, vl); +} + +vbool32_t test_shortcut_for_riscv_vmsgtu_case_5(vuint8mf4_t v1, size_t vl) { + return __riscv_vmsgtu_vv_u8mf4_b32(v1, v1, vl); +} + +vbool64_t test_shortcut_for_riscv_vmsgtu_case_6(vuint8mf8_t v1, size_t vl) { + return __riscv_vmsgtu_vv_u8mf8_b64(v1, v1, vl); +} + +vbool1_t test_shortcut_for_riscv_vmsge_case_0(vint8m8_t v1, size_t vl) { + return __riscv_vmsge_vv_i8m8_b1(v1, v1, vl); +} + +vbool2_t test_shortcut_for_riscv_vmsge_case_1(vint8m4_t v1, size_t vl) { + return __riscv_vmsge_vv_i8m4_b2(v1, v1, vl); +} + +vbool4_t test_shortcut_for_riscv_vmsge_case_2(vint8m2_t v1, size_t vl) { + return __riscv_vmsge_vv_i8m2_b4(v1, v1, vl); +} + +vbool8_t test_shortcut_for_riscv_vmsge_case_3(vint8m1_t v1, size_t vl) { + return __riscv_vmsge_vv_i8m1_b8(v1, v1, vl); +} + +vbool16_t test_shortcut_for_riscv_vmsge_case_4(vint8mf2_t v1, size_t vl) { + return __riscv_vmsge_vv_i8mf2_b16(v1, v1, vl); +} + +vbool32_t test_shortcut_for_riscv_vmsge_case_5(vint8mf4_t v1, size_t vl) { + return __riscv_vmsge_vv_i8mf4_b32(v1, v1, vl); +} + +vbool64_t test_shortcut_for_riscv_vmsge_case_6(vint8mf8_t v1, size_t vl) { + return __riscv_vmsge_vv_i8mf8_b64(v1, v1, vl); +} + +vbool1_t test_shortcut_for_riscv_vmsgeu_case_0(vuint8m8_t v1, size_t vl) { + return __riscv_vmsgeu_vv_u8m8_b1(v1, v1, vl); +} + +vbool2_t test_shortcut_for_riscv_vmsgeu_case_1(vuint8m4_t v1, size_t vl) { + return __riscv_vmsgeu_vv_u8m4_b2(v1, v1, vl); +} + +vbool4_t test_shortcut_for_riscv_vmsgeu_case_2(vuint8m2_t v1, size_t vl) { + return __riscv_vmsgeu_vv_u8m2_b4(v1, v1, vl); +} + +vbool8_t test_shortcut_for_riscv_vmsgeu_case_3(vuint8m1_t v1, size_t vl) { + return __riscv_vmsgeu_vv_u8m1_b8(v1, v1, vl); +} + +vbool16_t test_shortcut_for_riscv_vmsgeu_case_4(vuint8mf2_t v1, size_t vl) { + return __riscv_vmsgeu_vv_u8mf2_b16(v1, v1, vl); +} + +vbool32_t test_shortcut_for_riscv_vmsgeu_case_5(vuint8mf4_t v1, size_t vl) { + return __riscv_vmsgeu_vv_u8mf4_b32(v1, v1, vl); +} + +vbool64_t test_shortcut_for_riscv_vmsgeu_case_6(vuint8mf8_t v1, size_t vl) { + return __riscv_vmsgeu_vv_u8mf8_b64(v1, v1, vl); +} + +/* { dg-final { scan-assembler-times {vmseq\.vv\sv[0-9],\s*v[0-9],\s*v[0-9]} 7 } } */ +/* { dg-final { scan-assembler-times {vmsle\.vv\sv[0-9],\s*v[0-9],\s*v[0-9]} 7 } } */ +/* { dg-final { scan-assembler-times {vmsleu\.vv\sv[0-9],\s*v[0-9],\s*v[0-9]} 7 } } */ +/* { dg-final { scan-assembler-times {vmsge\.vv\sv[0-9],\s*v[0-9],\s*v[0-9]} 7 } } */ +/* { dg-final { scan-assembler-times {vmsgeu\.vv\sv[0-9],\s*v[0-9],\s*v[0-9]} 7 } } */ +/* { dg-final { scan-assembler-times {vmclr\.m\sv[0-9]} 35 } } */