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: 190881 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2553:b0:103:945f:af90 with SMTP id p19csp287632dyi; Tue, 23 Jan 2024 04:10:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IHJJuZYmrDfT+fiphPbcASaJdGPKQKZMMhPzTvZQylcHhCzwKhvm+BhDLcRJV1WMnoF1Thx X-Received: by 2002:a05:622a:1042:b0:42a:31e7:55dd with SMTP id f2-20020a05622a104200b0042a31e755ddmr925935qte.15.1706011853418; Tue, 23 Jan 2024 04:10:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706011853; cv=pass; d=google.com; s=arc-20160816; b=xMzkk29ipsGHdMLcpyhCUgJXjRZ0pJmJfDflc6jsbwwWPuXvNeI9UVed17fGfxD3X4 Nj2e89k95h0wn6Ns/nBbpP+lnYCYabiOPLNv1LYmsd2uS6pToIhoueYi06gxVKp5ftkf UEh/Ip8CciqXyh0/QtMFixOS1SqlxoTMdJBPVO/cHJGQS0JvLKTsbO3LmRA0jEYaul9i Ijlhj8Mc56q/wAp3XGOSLa+/sZkMOXptW6VfXkhX+aQ4+7F6in7VmUug2VXLLc6rkMkk ZCOtT4cDkWO1rQiiOwFn5feq3YbH2ufm1nxQWCKDwSLzlySdaSbsLNbokLtVi+ss+Ora eA8w== 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:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=m4CVc/FVORy3EsH0VeujsS02Oo/M+FA7TbHZRV/G7dM=; fh=ptzg5K9atjTLjswj8Yf0kYkJDhzi1Q4LEOAvT+B4ki0=; b=zYKCjvoPLtNnKEgPgbCqTeheAngJeZNLxccOc/LrasPlTWPX+mtPTC9+Qq6aHZ25wW UTo6IzKr9b8mTuR0hp1LOWaC4B9f2do6cHWbVFZV78XdHyTJM8e9uRsjsAMWc8uHah+O X7fLJpvGmEzVUub9OWehST/rp3eHgWX9cC4On5lrSfBFuJgraDcVHpD4raZf9sJYtEkU FTyeTJMgHyfUB5A7NbBFuSqs5n7ozOyMcLavFvswDeMbAfkq0YmVJgsH4weas3Uc2Zhz ngsGCDL6neDaJsxSw+DB6BH0kAWuJ23VlhZy8+Q0ldIxmmKvmhzpG60qTDjzAd9F2wt8 B9Mg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b=GYcCuhOc; 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"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=xry111.site Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id c20-20020ac87d94000000b0042a1e4a8047si7648668qtd.790.2024.01.23.04.10.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 04:10:53 -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; dkim=pass header.i=@xry111.site header.s=default header.b=GYcCuhOc; 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"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=xry111.site Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 128E6385800D for ; Tue, 23 Jan 2024 12:10:53 +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+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788883085407978068 X-GMAIL-MSGID: 1788883085407978068 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" } } */