From patchwork Wed Feb 14 13:05:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jambor X-Patchwork-Id: 1898941 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=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=kC7LR6Xp; dkim=pass header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=qsasZY6x; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=kC7LR6Xp; dkim=neutral header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=qsasZY6x; 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 4TZdjw0hcVz23j4 for ; Thu, 15 Feb 2024 00:06:10 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 41EFE385DC3A for ; Wed, 14 Feb 2024 13:06:03 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2a07:de40:b251:101:10:150:64:1]) by sourceware.org (Postfix) with ESMTPS id 4EF5E3857011 for ; Wed, 14 Feb 2024 13:05:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4EF5E3857011 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4EF5E3857011 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a07:de40:b251:101:10:150:64:1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707915944; cv=none; b=m1wz26fqstEjHAbguQjncvyYCsH1ZIZQD7onGcii1K88HZq1WOwP6sLXk/K4YbWTx+UTw5y5K/fPkv2LmNcNTg7BKWyQFrwMnYcWt02+Duf5rbFSb9/3+v+/F88WG+t8WtlpUI5BMWnTUtd5dGlRYh3OHBEpEUVDryAYS4qObbs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707915944; c=relaxed/simple; bh=C8KyEDnGcL8VHpbQDTNjWc+kCqvTgYdZ3DpyJxTqd6Y=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: To:Subject:Date:Message-ID:MIME-Version; b=a5wo/vyKquQ9pUGPVXeAuzuj3LNsL15d5S0cnYf+d13vpsb3+o8XSm7bZE3glVpHGyInRSBUcy2jrO3bkL6+5o4F0nst+RVZ4sL6uo6QluLi7OumyTCTMMHCsD4mzNMI7EvY71cHEBEBJImQOFyiPx8/LNqMY4fycmTGcy6HIx8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from imap2.dmz-prg2.suse.org (imap2.dmz-prg2.suse.org [10.150.64.98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 48D4A21989 for ; Wed, 14 Feb 2024 13:05:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1707915942; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=Y2K4O7UkegSbpzeWGR+nzmbTE75eYYQBTOata1ASrHo=; b=kC7LR6XpNLVYEwUtxuKKDtJeslEuloX4j+UlwXt1P+iLB5AGmw6Qur8YDtpZ9tEOjbMKyB LbAsom75eoDrX+tUnwHUm7FJXRhFYcP3eZ0knF8C9m1NLd2WnHxQ1d829SIFv0u13S4uyS bx0miqRSyRspWjMWb5KH+3g9Be7hMWk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1707915942; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=Y2K4O7UkegSbpzeWGR+nzmbTE75eYYQBTOata1ASrHo=; b=qsasZY6xRFiaMD3EHhPrE7/2t2ZB8s1X/7eDBcQ91xjJthbcYAdknE9j7YZpK8HJj5KA5r xOLmBirrghbFrnCA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1707915942; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=Y2K4O7UkegSbpzeWGR+nzmbTE75eYYQBTOata1ASrHo=; b=kC7LR6XpNLVYEwUtxuKKDtJeslEuloX4j+UlwXt1P+iLB5AGmw6Qur8YDtpZ9tEOjbMKyB LbAsom75eoDrX+tUnwHUm7FJXRhFYcP3eZ0knF8C9m1NLd2WnHxQ1d829SIFv0u13S4uyS bx0miqRSyRspWjMWb5KH+3g9Be7hMWk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1707915942; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=Y2K4O7UkegSbpzeWGR+nzmbTE75eYYQBTOata1ASrHo=; b=qsasZY6xRFiaMD3EHhPrE7/2t2ZB8s1X/7eDBcQ91xjJthbcYAdknE9j7YZpK8HJj5KA5r xOLmBirrghbFrnCA== Received: from imap2.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap2.dmz-prg2.suse.org (Postfix) with ESMTPS id 41E4913A0B for ; Wed, 14 Feb 2024 13:05:42 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap2.dmz-prg2.suse.org with ESMTPSA id zaQREKa6zGWaegAAn2gu4w (envelope-from ) for ; Wed, 14 Feb 2024 13:05:42 +0000 From: Martin Jambor To: GCC Patches Cc: Subject: [PATCH] testsuite: Fix guality/ipa-sra-1.c to work with return IPA-VRP User-Agent: Notmuch/0.38.2 (https://notmuchmail.org) Emacs/29.2 (x86_64-suse-linux-gnu) Date: Wed, 14 Feb 2024 14:05:41 +0100 Message-ID: MIME-Version: 1.0 Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: X-Spam-Score: -4.30 X-Spamd-Result: default: False [-4.30 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[gcc-patches@gcc.gnu.org]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_THREE(0.00)[3]; MID_RHS_MATCH_FROMTLD(0.00)[]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.cz:email]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-3.00)[100.00%] X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, 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 Hi, the test guality/ipa-sra-1.c stopped working after r14-5628-g53ba8d669550d3 because the variable from which the values of removed parameters could be calculated is also removed with it. Fixed with this patch which stops a function from returning a constant. I have also noticed that the XFAILed test passes at -O0 -O1 and -Og on all (three) targets I have tried, not just aarch64, so I extended the xfail exception accordingly. Tested by running make -k check-gcc RUNTESTFLAGS="guality.exp=ipa-sra-1.c" on x86_64-linux, aarch64-linux and ppc64le-linux. I hope it is obvious change for me to commit without approval which I will do later today. Thanks, Martin gcc/testsuite/ChangeLog: 2024-02-14 Martin Jambor * gcc.dg/guality/ipa-sra-1.c (get_val1): Move up in the file. (get_val2): Likewise. (bar): Do not return a constant. Extend xfail exception for all targets. --- gcc/testsuite/gcc.dg/guality/ipa-sra-1.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/gcc/testsuite/gcc.dg/guality/ipa-sra-1.c b/gcc/testsuite/gcc.dg/guality/ipa-sra-1.c index 9ef4eac93a7..55267c6f838 100644 --- a/gcc/testsuite/gcc.dg/guality/ipa-sra-1.c +++ b/gcc/testsuite/gcc.dg/guality/ipa-sra-1.c @@ -1,6 +1,10 @@ /* { dg-do run } */ /* { dg-options "-g -fno-ipa-icf" } */ +int __attribute__((noipa)) +get_val1 (void) {return 20;} +int __attribute__((noipa)) +get_val2 (void) {return 7;} void __attribute__((noipa)) use (int x) @@ -12,8 +16,8 @@ static int __attribute__((noinline)) bar (int i, int k) { asm ("" : "+r" (i)); - use (i); /* { dg-final { gdb-test . "k" "3" { xfail { ! { aarch64*-*-* && { any-opts "-O0" "-O1" "-Og" } } } } } } */ - return 6; + use (i); /* { dg-final { gdb-test . "k" "3" { xfail { ! { *-*-*-* && { any-opts "-O0" "-O1" "-Og" } } } } } } */ + return 6 + get_val1(); } volatile int v; @@ -30,11 +34,6 @@ foo (int i, int k) volatile int v; -int __attribute__((noipa)) -get_val1 (void) {return 20;} -int __attribute__((noipa)) -get_val2 (void) {return 7;} - int main (void) {