From patchwork Tue Feb 7 06:39:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "juzhe.zhong@rivai.ai" X-Patchwork-Id: 53722 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2684328wrn; Mon, 6 Feb 2023 22:40:03 -0800 (PST) X-Google-Smtp-Source: AK7set8o8bD6dJFWqhk2jPK+7uq9kACkBHaCi47+4CFFX+ObYCZgSHIVjoRYpV0d9NU11VmWQpJL X-Received: by 2002:a17:906:4710:b0:870:7b:94db with SMTP id y16-20020a170906471000b00870007b94dbmr2582848ejq.28.1675752003239; Mon, 06 Feb 2023 22:40:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675752003; cv=none; d=google.com; s=arc-20160816; b=HEH6AsdLvXPtfa2GN4WGz0i3+AJ673thlvTQZdd8FVgROat0KdI+Unl2ceQsJ3Xs4w GdjsFZgrE37dC3USnDETzN7UQyd13XEpzIARqDNE5V1YFgdP43wjlBbBmUabIJs7THmn Q2QWk3VSBbQOvjIvgepnFdndeqAeZNz64fFElAzkavyDpxhqkQ3nNLKOgqB3iUPpTw4H 1hZ/BraqRoK42ZUpzT+Vv4CablKNmf4S+bE7ZGbENgZKyb1v02liVId7C3UF0AIOOUMI 6dUOLI7zzDlysgI3rTK88RZGNZj4UAq7aRFkoY2TkzSvVgk4JDYY8NYM4Hc1fu01HY6w s9CQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:feedback-id :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dmarc-filter:delivered-to; bh=D5zt5iYryVfA4aMn9DV8VI7EQwr/pD2hpS+L0QIrZnk=; b=IX/GegUTydjrOBvvzLrremOjtm58SZ4uK+YJlsX1Kbd7mVpKjefqrOV/G8SEGVVsnN q5xda4iXMHcHfFUMnr79TNwFnfTsYfF3suQ5nVuChy0210Uvih9qru9ZadyoAa/ej5Vu uTMSWOf4P+AwW2De06mTsQhTMuFVkykfpJOgxAoO7UrrsxwY+nbmMOLH/KyY1b8JN1eR 7isXTH7GQWjQnhlGMqIAwRlP2Cp5S0iZWV/Um0uiYjofC/AFnVUK4lN/UH4N58j7hzX5 dW8CoM/wWACj9V07VjUBokM8376joCxqkNZHTf+0nrUW32DEjgKn1J5gMM69QHZELzVU Lp3A== 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 sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id wg15-20020a1709078f0f00b0088cd17ea3a3si13703599ejc.551.2023.02.06.22.40.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Feb 2023 22:40:03 -0800 (PST) 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 AE69E385842A for ; Tue, 7 Feb 2023 06:39:59 +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 7FE1A3858D1E for ; Tue, 7 Feb 2023 06:39:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7FE1A3858D1E 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: bizesmtp65t1675751968t3yjsnw9 Received: from server1.localdomain ( [58.60.1.22]) by bizesmtp.qq.com (ESMTP) with id ; Tue, 07 Feb 2023 14:39:27 +0800 (CST) X-QQ-SSF: 01400000000000E0L000000A0000000 X-QQ-FEAT: qxAR8rpszOvTHoZG6pAfPcPll6dEZqvoz0q5MARw/IFLaulE8y09wZRNpCdM8 7h3EZjWqNIl8ehWSXnX2ENUrDaT6wIJvmsqE6GYiXyl1VpFA61GqwzEEv3ERcIS5pZ6bMR2 Eyez9Icvr/+LOi+obPwZ+AWiBVTxoGeEfM3UJapQmrFqYKVHUa6pULHRhVybeB0+s51NFXY J7vjezMM3fHOk5/mCWKsHfvYpjHCpuj0XfNcl3GsiQuCcLSWzvMvCY7LlTBWt4OrGzjPnUN hBkNYyHsbqAXG0GWQQimq5oCcA4ioqrZoV2sdOYQI/jfoXCjvUjrb2ko0s1yb+7c5l/Gm3Q m23wcqmOXKwteYHhxylnkdzCB2aYvN7VGiXHq0wiWtLrIUYw/NCD/qS4S/D2b7Q6OWKSgXr 4OfpQ4fCLC8= X-QQ-GoodBg: 2 From: juzhe.zhong@rivai.ai To: gcc-patches@gcc.gnu.org Cc: kito.cheng@gmail.com, Ju-Zhe Zhong Subject: [PATCH] RISC-V: Add constraint tests Date: Tue, 7 Feb 2023 14:39:27 +0800 Message-Id: <20230207063927.40790-1-juzhe.zhong@rivai.ai> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:rivai.ai:qybglogicsvr:qybglogicsvr7 X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_SHORT, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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?1757153332726716096?= X-GMAIL-MSGID: =?utf-8?q?1757153332726716096?= From: Ju-Zhe Zhong gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/base/binop_vx_constraint-120.c: New test. --- .../riscv/rvv/base/binop_vx_constraint-120.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-120.c diff --git a/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-120.c b/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-120.c new file mode 100644 index 00000000000..809b185dd65 --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-120.c @@ -0,0 +1,16 @@ +/* { dg-do compile } */ +/* { dg-options "-march=rv32gcv -mabi=ilp32 -O3" } */ +#include "riscv_vector.h" + +vint16mf4_t test___riscv_vwmulsu_vx_i16mf4(vbool64_t mask, vint16mf4_t merge, vint8mf8_t op1,int8_t op2,size_t vl) +{ + return __riscv_vwmulsu_vx_i16mf4_tumu(mask,merge,op1,0,vl); +} + +vint16mf4_t test___riscv_vwmul_vx_i16mf4(vbool64_t mask, vint16mf4_t merge, vint8mf8_t op1,int8_t op2,size_t vl) +{ + return __riscv_vwmul_vx_i16mf4_tumu(mask,merge,op1,0,vl); +} + +/* { dg-final { scan-assembler-times {vsetvli\s+zero,\s*[a-x0-9]+,\s*e8,\s*mf8,\s*t[au],\s*m[au]\s+vwmul\.vx\s+v[0-9]+,\s*v[0-9]+,zero} 1 } } */ +/* { dg-final { scan-assembler-times {vsetvli\s+zero,\s*[a-x0-9]+,\s*e8,\s*mf8,\s*t[au],\s*m[au]\s+vwmulsu\.vx\s+v[0-9]+,\s*v[0-9]+,zero} 1 } } */