From patchwork Mon Oct 9 14:59:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?6ZKf5bGF5ZOy?= X-Patchwork-Id: 1845286 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S42Jn1N66z1yqP for ; Tue, 10 Oct 2023 02:00:25 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3F32B385703A for ; Mon, 9 Oct 2023 15:00:23 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtpbg151.qq.com (smtpbg151.qq.com [18.169.211.239]) by sourceware.org (Postfix) with ESMTPS id 197BD385F00B for ; Mon, 9 Oct 2023 15:00:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 197BD385F00B 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: bizesmtp78t1696863599tna92dmh Received: from rios-cad122.hadoop.rioslab.org ( [58.60.1.26]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 09 Oct 2023 22:59:58 +0800 (CST) X-QQ-SSF: 01400000000000G0V000000A0000000 X-QQ-FEAT: tym1VHZoWxky+QjmE3TuvaQMCEHy9YyVC1ASRr8SoLDn8XMN7vA5NMegYWviX rHhT8BTVa+O7t+NETq6YEj/7Lhb99+aOQr7h2XPrgj0WMn0D+wkOCSwhiujr+if/HkkZiyw BSqkDMECyzGgKP/yzO7CnJt+z62ix2e8PiOxps4lcTUNsPDlFFrfCaHdPXTn+FflKNyqYZc BFfodqJeM1dbY4MSt9kvmGCLQBPCfmZN61FE0oWsexJvY4N+lyJckFGS1Og9fIJdgZXkCbr EP8RT4YlxHwymVsTSQzxX/dcTS3vfESafhymsbkGpKfpS1wyT2NqNLh7JQwb6vVP+ZHCbJm ss0816NEIltRzR+XuZ1sQnKW/NTdgwXgLU9kozfbFNBE9Bigf7j1R4JSnL3BWI/OGpngvL3 y0o+Iw9NfqA= X-QQ-GoodBg: 2 X-BIZMAIL-ID: 111807355625063289 From: Juzhe-Zhong To: gcc-patches@gcc.gnu.org Cc: jeffreyalaw@gmail.com, Juzhe-Zhong Subject: [PATCH] TEST: Add vectorization check Date: Mon, 9 Oct 2023 22:59:57 +0800 Message-Id: <20231009145957.51655-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, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org These cases won't check SLP for load_lanes support target. Add vectorization check for situations. gcc/testsuite/ChangeLog: * gcc.dg/vect/pr97832-2.c: Add vectorization check. * gcc.dg/vect/pr97832-3.c: Ditto. * gcc.dg/vect/pr97832-4.c: Ditto. --- gcc/testsuite/gcc.dg/vect/pr97832-2.c | 1 + gcc/testsuite/gcc.dg/vect/pr97832-3.c | 1 + gcc/testsuite/gcc.dg/vect/pr97832-4.c | 1 + 3 files changed, 3 insertions(+) diff --git a/gcc/testsuite/gcc.dg/vect/pr97832-2.c b/gcc/testsuite/gcc.dg/vect/pr97832-2.c index 7d8d2691432..60e8e8516fc 100644 --- a/gcc/testsuite/gcc.dg/vect/pr97832-2.c +++ b/gcc/testsuite/gcc.dg/vect/pr97832-2.c @@ -27,3 +27,4 @@ void foo1x1(double* restrict y, const double* restrict x, int clen) /* { dg-final { scan-tree-dump "vectorizing stmts using SLP" "vect" { target { ! { vect_load_lanes && vect_strided8 } } } } } */ /* { dg-final { scan-tree-dump "Loop contains only SLP stmts" "vect" { target { ! { vect_load_lanes && vect_strided8 } } } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/pr97832-3.c b/gcc/testsuite/gcc.dg/vect/pr97832-3.c index c0603e1432e..2dc76e5b565 100644 --- a/gcc/testsuite/gcc.dg/vect/pr97832-3.c +++ b/gcc/testsuite/gcc.dg/vect/pr97832-3.c @@ -48,3 +48,4 @@ void foo(double* restrict y, const double* restrict x0, const double* restrict x /* { dg-final { scan-tree-dump "vectorizing stmts using SLP" "vect" { target { ! { vect_load_lanes && vect_strided8 } } } } } */ /* { dg-final { scan-tree-dump "Loop contains only SLP stmts" "vect" { target { ! { vect_load_lanes && vect_strided8 } } } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/pr97832-4.c b/gcc/testsuite/gcc.dg/vect/pr97832-4.c index c03442816a4..7e74c9313d5 100644 --- a/gcc/testsuite/gcc.dg/vect/pr97832-4.c +++ b/gcc/testsuite/gcc.dg/vect/pr97832-4.c @@ -26,3 +26,4 @@ void foo1x1(double* restrict y, const double* restrict x, int clen) /* { dg-final { scan-tree-dump "vectorizing stmts using SLP" "vect" { target { ! { vect_load_lanes && vect_strided8 } } } } } */ /* { dg-final { scan-tree-dump "Loop contains only SLP stmts" "vect" { target { ! { vect_load_lanes && vect_strided8 } } } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */