From patchwork Tue Nov 21 02:18:37 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: 167473 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp351956vqb; Mon, 20 Nov 2023 18:19:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IGKj/2n/6viNa6rJa32J1+2WTX4dF8mS38dJMlw1alvCT+tTQ9GoEWPASjSx+3ydy05BR+M X-Received: by 2002:a05:6102:366b:b0:45d:a2ac:44eb with SMTP id bg11-20020a056102366b00b0045da2ac44ebmr7291428vsb.17.1700533155123; Mon, 20 Nov 2023 18:19:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1700533155; cv=pass; d=google.com; s=arc-20160816; b=mxZUaJAEVNeashoDswW6CR4bN9y5yGqmD84+KNkKiLpct1tz7IBo3p3JG/G4NyVgPY /owQpB0gd9wRo8xDuQUO6HsDg2/uFcsY3McDKYzJ6hjEiBoIZ4nEvNZXlP1DPnNljGA/ vtqGVqwetnXAEI89+qsEri1gHjKX2I4IMcSXfMgjePauIfzccQOBYS4EFQ7lIQVciT8N PXwSzb5tTXigSCSXboy675doYp2WmD4XPzMa5iXz20mMq72IMbjQqK8S8vmzP2z3BXLu d3Oj+wPu6XeG+yxGU7Dz3rszZ4zE7h3Sdg8aFc5bdIGddPt3b2NRBF19rwcgs2bLyqys sV7Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=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:arc-filter:dmarc-filter:delivered-to; bh=7VTShtPoWQyQvKPA/ZjR9EMTfvlkrJnrerkrmH2So4M=; fh=idvV5TQ1gmHAoU8u1GUGfjilVySOK+BR5TeZLoSouN8=; b=hC2q6Y12wJwltb7d8sZN6DEqzl3bN/AaCUzbLwypD9L4X/7/THaKSNR+MO97LgIV/u B4yffasfFpleuW+4gkx0cIgJp0wkmFyJKHzAaJOql3gKMre7CXbl6I/TnzbUTtll6KVM MlnonSdULwbKcU6yN3AFYAbeDx0CjSAv61TJz6BD/cz9zWMGrli4Mz0l0WENde/ECSLy e/KVHa1ET4+hpTZyUxaq0FlsVAsYZJY9wD5JLXCDXDsqYZh+COE9uIsXMwyYEwdjUttX TAyMvM8K7+8WsimxN85Frg1z+jlRzfhPwxy8bt1phJKDGHCdeErum35m+VX10J0iYxRw DMGQ== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); 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 t27-20020a05622a181b00b0041812c64682si8137881qtc.112.2023.11.20.18.19.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 18:19:15 -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; arc=pass (i=1); 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 E0ECC3858415 for ; Tue, 21 Nov 2023 02:19:14 +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 82CDC3858D35 for ; Tue, 21 Nov 2023 02:18:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 82CDC3858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivai.ai Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivai.ai ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 82CDC3858D35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=54.207.22.56 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700533130; cv=none; b=WfIB5Z3r32N1yeSqeMeIU8p/i9B8s3rpoUqhXqHjqqhHNoDX+MvS98mJvNkVTH3rTSB+0UvGqFDRI844ENjeY+Yp7J/rvuhqfnrx1TMWXeyxtg0yuM67zGKC6EmzRrxtHl6HZbaafJ2aRdQA+gQsR/r/imdvFP6bHZW/J0DnGMM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700533130; c=relaxed/simple; bh=e7T10tSFDcUsy8JxxtuuAZHBY284Pgtbh5VMcDtfNWA=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=iycqQ/PcMcmCmMwXoDABwwRrCehpbUkYjr5B77oUQ2WSKJvW/fqyzjg845MWvyd3QpRbf1Ej0vZGOlUQVZYYMwwDNYD+sAfyvzypDb7VoB4/IG1VOMkmKgGxFWZ4lTJt/3/HqGPzEpDbpH+AL4aXkpMdy6zkiBppLKLEW031Cbk= ARC-Authentication-Results: i=1; server2.sourceware.org X-QQ-mid: bizesmtp71t1700533120t102kjqh Received: from rios-cad122.hadoop.rioslab.org ( [58.60.1.26]) by bizesmtp.qq.com (ESMTP) with id ; Tue, 21 Nov 2023 10:18:38 +0800 (CST) X-QQ-SSF: 01400000000000G0V000000A0000000 X-QQ-FEAT: C46Rb8GPIEfaNv2M52GaY8eDjyCFoNnJXl6HPGqxIrsux6aU8DZXeGWKZS8hL gBQPorwPBAtIzcgZ8I4WxM1jU1y5urR/sew0F+cP4YsA/znrWO01rd5H5JvJZo8yTg2v7xa yA6sBBFaQ7/Ne6LyjfetByiJ68VOnRNzjXeQ0Z24VCPS0X+5niLWlTvqok6vg8yrB2Tc6+C QSuCyvr1gS/Ewttxs/aVxY42b7MDgzaHyGB48H9huWRYzLrMDuq6k3Ns62dc3bsETqvWKrd HCW5oJK23UBBts+ITW1JRL4VMz4UlI2vlRqDtDqL6MZ6oN8Kwaydg9mF1uXDoQPo1GqA+P1 creKZwEENwmZdr0kTa9YAgnhDkmk9TJilP0ynJEyAcC6Jh4srcanUHR056cQqyhVm775spm HmtCgDD7rvM= X-QQ-GoodBg: 2 X-BIZMAIL-ID: 312329866403490632 From: Juzhe-Zhong To: gcc-patches@gcc.gnu.org Cc: Juzhe-Zhong Subject: [Committed] RISC-V: Fix reduc_run-9.c test value check bug Date: Tue, 21 Nov 2023 10:18:37 +0800 Message-Id: <20231121021837.1558057-1-juzhe.zhong@rivai.ai> X-Mailer: git-send-email 2.36.3 MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:rivai.ai:qybglogicsvrgz:qybglogicsvrgz7a-one-0 X-Spam-Status: No, score=-10.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_SHORT, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783138253576159043 X-GMAIL-MSGID: 1783138253576159043 The current test value check is incorrect which is exposed on -march=rv64gcv_zvl256b Confirm on X86 also abort: [jzzhong@rios-cad121:/work/home/jzzhong/work/insn]$./a.out ------33.000000,4078.000000,45001776.000000,63369904.000000--- Aborted (core dumped) Adapt the value check according to X86 result. Pushed as it is obvious. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/reduc/reduc_run-9.c: Fix bug. --- .../gcc.target/riscv/rvv/autovec/reduc/reduc_run-9.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/reduc/reduc_run-9.c b/gcc/testsuite/gcc.target/riscv/rvv/autovec/reduc/reduc_run-9.c index a0d59040ce8..0f95e61ee47 100644 --- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/reduc/reduc_run-9.c +++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/reduc/reduc_run-9.c @@ -1,5 +1,4 @@ /* { dg-do run { target { riscv_v } } } */ -/* { dg-additional-options "--param=riscv-autovec-preference=scalable -ffast-math -fno-vect-cost-model" } */ #define N 0x1100 @@ -14,8 +13,8 @@ main (void) if (add_loop (x, 0, 33) != 33 || add_loop (x, 11, 30) != 4078 - || add_loop (x, 0x100, 45) != 45001773 - || add_loop (x, 0x11f, 300) != 63369900) + || add_loop (x, 0x100, 45) != 45001776 + || add_loop (x, 0x11f, 300) != 63369904) __builtin_abort (); return 0;