From patchwork Tue Jan 23 12:09:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xi Ruoyao X-Patchwork-Id: 1889682 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=xry111.site header.i=@xry111.site header.a=rsa-sha256 header.s=default header.b=GYcCuhOc; dkim-atps=neutral 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 4TK5Ws03Msz1yS7 for ; Tue, 23 Jan 2024 23:10:33 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 018553858016 for ; Tue, 23 Jan 2024 12:10:31 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from xry111.site (xry111.site [89.208.246.23]) by sourceware.org (Postfix) with ESMTPS id ABBF93858431 for ; Tue, 23 Jan 2024 12:10:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ABBF93858431 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=xry111.site ARC-Filter: OpenARC Filter v1.0.0 sourceware.org ABBF93858431 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=89.208.246.23 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706011814; cv=none; b=eSEDsSvnIJGxhuEfum6HEbbBTTy4LVz4164ibqgw5D4tmn7aT3e6wQDdXi97kw7MUXix1fcgjjh3Hs09puEni7XGaOKJnsxJzykQZMVDsMAU2Psv8eSgkX9095zX71fFATONfxIJTul8rYIip0ZJnRtloug7xZIDWfiemcOEqZo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706011814; c=relaxed/simple; bh=vLLH2QS+AB/euCyeZH3GLHz2plbS8BFe7wlQ5TJbnQY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=bD9QW4NrWORHz/FMYihw01HPP/sy2hlKXMTodhhK9/DZWG7sGIY7/RY0Zv8LPh47AU8QCHUWAJtfBl9ylgbMS/aSjLLRfR5k840J8Dh4TNe8mGT6/UWVCuyzOhz4S5MKahh6g6ivJHCDBvhFy8fE/RKoas5o0IF0OxO8zYHNEjM= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1706011811; bh=vLLH2QS+AB/euCyeZH3GLHz2plbS8BFe7wlQ5TJbnQY=; h=From:To:Cc:Subject:Date:From; b=GYcCuhOcYS8ilm2dIzcr56AvItEi1OYWB6ZqLWpeTEi0BKg2Z4x9KJgyGGEIw1bac zpM0Hd9cRtzA03fDqx3PhpEFiE8gzJB8/VbGm7x3OVU/RzAYUcdVpWboxs/dqv7JZM qNZXUf/gd1CfDQRPY/DWJq7o6WT3pc/C7ZmVM84w= Received: from stargazer.. (unknown [IPv6:2408:8471:1007:e81f:cd5c:87ba:f9ec:e5d1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id C0C1E66975; Tue, 23 Jan 2024 07:10:06 -0500 (EST) From: Xi Ruoyao To: gcc-patches@gcc.gnu.org Cc: Andrew Pinski , "Kewen . Lin" , Jakub Jelinek , chenxiaolong@loongson.cn, Xi Ruoyao Subject: [PATCH] testsuite: Make pr104992.c irrelated to target vector feature [PR113418] Date: Tue, 23 Jan 2024 20:09:31 +0800 Message-ID: <20240123120956.45968-1-xry111@xry111.site> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Spam-Status: No, score=-9.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, LIKELY_SPAM_FROM, 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+incoming=patchwork.ozlabs.org@gcc.gnu.org The vect_int_mod target selector is evaluated with the options in DEFAULT_VECTCFLAGS in effect, but these options are not automatically passed to tests out of the vect directories. So this test fails on targets where integer vector modulo operation is supported but requiring an option to enable, for example LoongArch. In this test case, the only expected optimization not happened in original is in corge because it needs forward propogation. So we can scan the forwprop2 dump (where the vector operation is not expanded to scalars yet) instead of optimized, then we don't need to consider vect_int_mod or not. gcc/testsuite/ChangeLog: PR testsuite/113418 * gcc.dg/pr104992.c (dg-options): Use -fdump-tree-forwprop2 instead of -fdump-tree-optimized. (dg-final): Scan forwprop2 dump instead of optimized, and remove the use of vect_int_mod. --- This fixes the test failure on loongarch64-linux-gnu, and I've also tested it on x86_64-linux-gnu. Ok for trunk? gcc/testsuite/gcc.dg/pr104992.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gcc/testsuite/gcc.dg/pr104992.c b/gcc/testsuite/gcc.dg/pr104992.c index 82f8c75559c..6fd513d34b2 100644 --- a/gcc/testsuite/gcc.dg/pr104992.c +++ b/gcc/testsuite/gcc.dg/pr104992.c @@ -1,6 +1,6 @@ /* PR tree-optimization/104992 */ /* { dg-do compile } */ -/* { dg-options "-O2 -Wno-psabi -fdump-tree-optimized" } */ +/* { dg-options "-O2 -Wno-psabi -fdump-tree-forwprop2" } */ #define vector __attribute__((vector_size(4*sizeof(int)))) @@ -54,5 +54,4 @@ __attribute__((noipa)) unsigned waldo (unsigned x, unsigned y, unsigned z) { return x / y * z == x; } -/* { dg-final { scan-tree-dump-times " % " 9 "optimized" { target { ! vect_int_mod } } } } */ -/* { dg-final { scan-tree-dump-times " % " 6 "optimized" { target vect_int_mod } } } */ +/* { dg-final { scan-tree-dump-times " % " 6 "forwprop2" } } */