From patchwork Thu Dec 14 07:47:52 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: 178555 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:3b04:b0:fb:cd0c:d3e with SMTP id c4csp8379659dys; Wed, 13 Dec 2023 23:48:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IGRfHqSv9C9WeAZ5EdWbXUVrK4ua+d1Wa8Ex/Mc3w+0QPU4Q8RDYVnHIG/5Qy+p6KkfR2RS X-Received: by 2002:a0c:e70a:0:b0:67a:dcc3:e673 with SMTP id d10-20020a0ce70a000000b0067adcc3e673mr6519111qvn.87.1702540106072; Wed, 13 Dec 2023 23:48:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1702540106; cv=pass; d=google.com; s=arc-20160816; b=YB3Ke/GpYI9AK7SfZ7jarIbay/m6qguQj492k0OvibJ71SEwe3NGSnYI0vzZhmT8t5 YWZsnyxIlwamWEhv8hR7HaaNKzs+n04zGNPMxzn2jb0iW+DOE0e5HrjYVuDJkdu09pV3 P+SndvfBCSIo9LeM1BDYVrx5ge2GnAYd38LYvvgoKuxg45Ea6V0eYyCG4Ci9+p9Ty4lY e7OcvS8D+ZOo5jjlQJnvzR14tQQg3reO0OZw+eeeup7L0SOIExX0Plo2jMwd4qP3DPaN p6oAjVhrBxm+RjyOF7777WZnCSakAtjmGnGJeMCZ+h9/koNBztkcGvxYwQu/IfYjGP1G /Kfg== 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=YfO040aYIG1HHPnCIP7tKu7uluhnAmWvYUCBpwHBUY4=; fh=idvV5TQ1gmHAoU8u1GUGfjilVySOK+BR5TeZLoSouN8=; b=xGkrhnU/sYcaFj8YqfEGGdvG+O2DDVVbO22NEz3lxEslp+JRJ1OkdUQ3OXQugRTO4r 9Mw2l7awGU6dMslyl6tdvU5GmeYN/EaDpiWg6RacTPhTUbOGd+qA7C2jaHwlFBl7LJvL 9dAVnPUdEuC1KucxYCWhb/36JFZeL31QDg3UB3H0k4iU3rxLtQA3ua37IYHx/ni43ao5 nTAxFu3/BxTZ/iaWOQk7l0N/EsaLOLL1tL9xgSEonBZ4QO/RBWGkPh0JhxiyPOac+XqD Gu7eAIv2AGa9rxu7BoPou45AKB9UWk+lJA+rlwEhZgB8e4zXHHKEz3QbJ44Jh/huHTqq QQqg== 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 z3-20020ad44143000000b0067f0202b998si2025179qvp.33.2023.12.13.23.48.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 23:48:26 -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 C7F76386183E for ; Thu, 14 Dec 2023 07:48:25 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtpbguseast2.qq.com (smtpbguseast2.qq.com [54.204.34.130]) by sourceware.org (Postfix) with ESMTPS id 77EEC3858D20 for ; Thu, 14 Dec 2023 07:48:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 77EEC3858D20 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 77EEC3858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=54.204.34.130 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702540083; cv=none; b=UrLEyj9Mvog16LcLdgy0m/j6X9JZyAkC0E9/mrjNJu5EhJXqFXcR5Bihs3lFDeHfrayqRxk89qxY9yrANAih4zefxBGIq/XWrlH0c5CKywpncHWCb3SuKF3W9/l5udbt2I6GKAlmCN4wC1P31CQvfGf+P6ZDoFREmXhGuj6G92U= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702540083; c=relaxed/simple; bh=Rv7nBXRV5cSkYL6FZmV06EPQJepeIMwKNKJb5rRUODI=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=nF8SsK+LFnL6E5fa6Y3161BwUZUw+4oimoPvxRHKeB05BGnPaM6YYMTBybThHTmA5OLUSMak2JElaxrJ2SyLqoCkiQPVM4CgFTtyUfIR7rutLGNa8w0ekgfyt7p/MQ3VUSD8xiK6gXpLRlNpeAxGFJMPuYrZ9upgt4mGVJ3NZTc= ARC-Authentication-Results: i=1; server2.sourceware.org X-QQ-mid: bizesmtp65t1702540075tgpmlzld Received: from rios-cad5.localdomain ( [58.60.1.25]) by bizesmtp.qq.com (ESMTP) with id ; Thu, 14 Dec 2023 15:47:54 +0800 (CST) X-QQ-SSF: 01400000000000G0V000000A0000000 X-QQ-FEAT: D2GZf6M6C/j9zycobAceXL5Jpece62hAiMo81coO+kcP4wkXWDXUARLetpGGG mj9fPiTq40SD1swfd425dt83c0+g8ij2x9wsH7MPll/0t5fEFBfpmo3iIGfwwdrIybQ/oSm obi8c0H7cRNj+dhb+5TsnAPCWIw00eUL4etlX1p6I5q0zp7pyGxTU/pRnnuh8FbKLx/FCvf OsKgW2ugcGBXE5glAyK+Rx5Qptlxv58AuTXy8j/43fV3DbetAB6LZWe0jtq8UuIQlTZpxxg RmLyIY9Zyffwmt0rdcnAEW5STQbUvaTlzF/vhr+98ccy/Lb/LJA5u/1MzAhiln/lXRGEOFx Udj1mV12wlbX5hujgpuvd4nWhTABS8XNSe51gQAG11BMeHZUQneA7vSudGSLjSuU2QmPIEX X-QQ-GoodBg: 2 X-BIZMAIL-ID: 13346846575746054592 From: Juzhe-Zhong To: gcc-patches@gcc.gnu.org Cc: Juzhe-Zhong Subject: [Committed] RISC-V: Add failed SLP testcase Date: Thu, 14 Dec 2023 15:47:52 +0800 Message-Id: <20231214074752.6196-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.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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: 1785242694115658110 X-GMAIL-MSGID: 1785242694115658110 After recent RVV cost model tweak, I found this PR issue has been fixed. Add testcase and committed. PR target/112387 gcc/testsuite/ChangeLog: * gcc.dg/vect/costmodel/riscv/rvv/pr112387.c: New test. --- .../vect/costmodel/riscv/rvv/pr112387.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/pr112387.c diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/pr112387.c b/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/pr112387.c new file mode 100644 index 00000000000..ee44b5f09e8 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/pr112387.c @@ -0,0 +1,19 @@ +/* { dg-do compile } */ +/* { dg-options "-march=rv64gcv -mabi=lp64d -O3 -ftree-vectorize -fdump-tree-vect-details" } */ + +#include + +void +f2 (uint64_t *__restrict y, uint64_t *__restrict x, + uint64_t *__restrict indices, uint64_t n) +{ + for (int64_t i = 0; i < n; ++i) + { + y[i * 2] = x[indices[i * 2]] + 1; + y[i * 2 + 1] = x[indices[i * 2 + 1]] + 2; + } +} + +/* { dg-final { scan-tree-dump "Loop contains only SLP stmts" vect } } */ +/* { dg-final { scan-assembler-not "vlseg" } } */ +/* { dg-final { scan-assembler-not "vsseg" } } */