From patchwork Fri Aug 9 11:08:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 1970901 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=aCOGh8ad; 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 4WgLlf2vNfz1ybT for ; Fri, 9 Aug 2024 21:09:34 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 443CB3858427 for ; Fri, 9 Aug 2024 11:09:32 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by sourceware.org (Postfix) with ESMTPS id 76F6A3858414 for ; Fri, 9 Aug 2024 11:09:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 76F6A3858414 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=baylibre.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 76F6A3858414 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::42d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1723201748; cv=none; b=Eo5OX+D1zA3I/udLpxolAqlCRTl5tif0pWrGpkZ/KiC+XV/rBUE2x0tH+FwnFmQsoQTyaUcr/tw7OTcgCmzTa/3ZetD/oeMMHdml3ShftIC8BEz7Eu+cvMcifEDoodKv4MMSB4hcBJ8K1OKittiJkQitVanYTRnMuk6733402lE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1723201748; c=relaxed/simple; bh=e6IxLJe/+xA+a6ob5jfsTxWgYzPD3ryXLfsiKPN+ec4=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=BzxqGUq6iSG/2U3GxRxRr66RQpEmQGA6aNy+i4hCfTCtgq38DUnSAzKzqrgDvbrbnDWA+jm9uhSAHX98A0WHYfu/s1sIpzBeexPV39qrBEIh51Cj//7C4xbb6WjIGXcQvJ7ovu9RRechJpiTzgT0ANsC5JRU7gZmWG0bEmAKul8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-36844375001so889962f8f.0 for ; Fri, 09 Aug 2024 04:09:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1723201743; x=1723806543; darn=gcc.gnu.org; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=1rtF1ZLsEUh8WHeAcbPHE+8LTzomLvwjpHeKxxcM9Z4=; b=aCOGh8adX5/PnCK9LUu5xkMAPaolXACJo1BuZo5g+Fo/SgRY8aeQzzjg9wJvQanQOX y62vfE6/idwf7GDU1ctKoelOuxzaN21caahiE1QPtmnkmxI4/piGKtBtGelevbgwilUT B+Gdqfy//RPMCw6WKnDD8/rHOsch9kNWPuQ24c09CCQXn9azli60aPM6iPHODEUrPcUv nGhEclB0Dz8BxKWFZDAVrDqJNRYXeSu5HMxD7J/kFzAExOmJPKiuHcZRSooD44XIGs5r 9Rd/A71ultN+JTnzeJDp8OxA4KolJbDGj5LsjkcB3hIaGIOjND/iMzsN0HC3AokOGAqP 1/3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723201743; x=1723806543; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=1rtF1ZLsEUh8WHeAcbPHE+8LTzomLvwjpHeKxxcM9Z4=; b=GQpouV9q3yo6VzESabPPB33YT8fQ5olmrMPqBbn3bjl4jAKVo3sWzpf/2LfrAarO3U ZCfsIlx97pTaArio0+M9PVD5OLa9jbhhVn9zYTN5mjrcu4yaw4jHJYKksnPqsd7ttzLq MrTm222V1RHGTDHzqR+hJ5g6N3ub+kNU0d7ZNzYOkMGXy+RUR3AHXYGebxcShOBL1ovZ mlelcZtyil++TI5g2DV+a1J5V86Kem/hzZIl5iPJbcX7F2CyyZKjTWmaGJzMtzRKSfZE p5JwOBMMF5Wvlmq23Lm+z1PmreQ5KR2bJaY15zK8cVnhiccNZhCmNRlOCTqm6vJYu9e5 E5/Q== X-Forwarded-Encrypted: i=1; AJvYcCW69587yNIQVrR+9RLZ9iz6D1RjY8WZf1mLIXRz9aPJbF7KT1YAjOeZN4n2W23f4P2pOwtwIIT19JimAjQL4FzRtHWXYCBLaw== X-Gm-Message-State: AOJu0YyHW64EYZ7Lz50jYl9RVp9gGIek6r5jaG/AxtKU8uaPX1BwOKc6 gedqlI80Cyn8WWnZpH0qz5/dOhFnUSG8GkSTknta7V+UjcVeQMby19/mhaiflQax9Qq38cyNqTe Y X-Google-Smtp-Source: AGHT+IHWjdH9iNC04eEiGuiQzK2rS0c/PXY761iYBYPiP1sIk9/fS3szDWnf3dHXc4fzUetM8BA06w== X-Received: by 2002:adf:fe46:0:b0:360:79d4:b098 with SMTP id ffacd0b85a97d-36d5e7fd90fmr820170f8f.29.1723201742827; Fri, 09 Aug 2024 04:09:02 -0700 (PDT) Received: from euler.schwinge.ddns.net (p200300c8b733b9005e8fc6f38b6af531.dip0.t-ipconnect.de. [2003:c8:b733:b900:5e8f:c6f3:8b6a:f531]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36d272086ebsm4967874f8f.72.2024.08.09.04.09.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Aug 2024 04:09:02 -0700 (PDT) From: Thomas Schwinge To: Tobias Burnus , gcc-patches@gcc.gnu.org Cc: Jakub Jelinek Subject: OpenMP: Constructors and destructors for "declare target" static aggregates: Fix effective-target keyword in test cases (was: [PATCH, v3] OpenMP: Constructors and destructors for "declare target" static aggregates) In-Reply-To: <389518c1-7db2-4eb2-8cba-21a2ae51d2a8@baylibre.com> References: <20230512120247.3213280-1-julian@codesourcery.com> <389518c1-7db2-4eb2-8cba-21a2ae51d2a8@baylibre.com> User-Agent: Notmuch/0.30+8~g47a4bad (https://notmuchmail.org) Emacs/29.4 (x86_64-pc-linux-gnu) Date: Fri, 09 Aug 2024 13:08:59 +0200 Message-ID: <87seveosvo.fsf@euler.schwinge.ddns.net> MIME-Version: 1.0 X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, 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 Hi! On 2024-08-07T14:08:42+0200, Tobias Burnus wrote: > --- /dev/null > +++ b/libgomp/testsuite/libgomp.c++/static-aggr-constructor-destructor-1.C > +// { dg-additional-options -foffload-options=-fdump-tree-optimized { target { offload_device_nvptx || offload_target_amdgcn } } } Note here: 'offload_device_nvptx' vs. 'offload_target_amdgcn', but... > +// { dg-final { only_for_offload_target amdgcn-amdhsa scan-offload-tree-dump-not "omp_initial_device;" "optimized" { target offload_target_amdgcn } } } > +// { dg-final { only_for_offload_target amdgcn-amdhsa scan-offload-tree-dump "v1\\._x = 5;" "optimized" { target offload_target_amdgcn } } } > +// { dg-final { only_for_offload_target nvptx-none scan-offload-tree-dump-not "omp_initial_device;" "optimized" { target offload_target_nvptx } } } > +// { dg-final { only_for_offload_target nvptx-none scan-offload-tree-dump "v1\\._x = 5;" "optimized" { target offload_target_nvptx } } } ... here: 'offload_target_nvptx', 'offload_target_amdgcn', resulting in a few UNRESOLVEDs. > [Etc.] Pushed to trunk branch commit 9f5d22e3e2b8e4532896a4f3837cb86006d5930c "OpenMP: Constructors and destructors for "declare target" static aggregates: Fix effective-target keyword in test cases", see attached. Grüße Thomas From 9f5d22e3e2b8e4532896a4f3837cb86006d5930c Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Fri, 9 Aug 2024 11:23:15 +0200 Subject: [PATCH] OpenMP: Constructors and destructors for "declare target" static aggregates: Fix effective-target keyword in test cases (Most of) the tests added in commit f1bfba3a9b3f31e3e06bfd1911c9f223869ea03f "OpenMP: Constructors and destructors for "declare target" static aggregates" had a mismatch between dump file production and its scanning; the former needs to use 'offload_target_nvptx' (like 'offload_target_amdgcn'), not 'offload_device_nvptx'. libgomp/ * testsuite/libgomp.c++/static-aggr-constructor-destructor-1.C: Fix effective-target keyword. * testsuite/libgomp.c++/static-aggr-constructor-destructor-2.C: Likewise. * testsuite/libgomp.c-c++-common/target-is-initial-host-2.c: Likewise. * testsuite/libgomp.c-c++-common/target-is-initial-host.c: Likewise. * testsuite/libgomp.fortran/target-is-initial-host-2.f90: Likewise. * testsuite/libgomp.fortran/target-is-initial-host.f: Likewise. * testsuite/libgomp.fortran/target-is-initial-host.f90: Likewise. --- .../libgomp.c++/static-aggr-constructor-destructor-1.C | 2 +- .../libgomp.c++/static-aggr-constructor-destructor-2.C | 2 +- .../testsuite/libgomp.c-c++-common/target-is-initial-host-2.c | 2 +- libgomp/testsuite/libgomp.c-c++-common/target-is-initial-host.c | 2 +- libgomp/testsuite/libgomp.fortran/target-is-initial-host-2.f90 | 2 +- libgomp/testsuite/libgomp.fortran/target-is-initial-host.f | 2 +- libgomp/testsuite/libgomp.fortran/target-is-initial-host.f90 | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libgomp/testsuite/libgomp.c++/static-aggr-constructor-destructor-1.C b/libgomp/testsuite/libgomp.c++/static-aggr-constructor-destructor-1.C index b5aafc8cabc..a704e39411d 100644 --- a/libgomp/testsuite/libgomp.c++/static-aggr-constructor-destructor-1.C +++ b/libgomp/testsuite/libgomp.c++/static-aggr-constructor-destructor-1.C @@ -1,6 +1,6 @@ // { dg-do run } // { dg-additional-options "-fdump-tree-gimple -fdump-tree-optimized" } -// { dg-additional-options -foffload-options=-fdump-tree-optimized { target { offload_device_nvptx || offload_target_amdgcn } } } +// { dg-additional-options -foffload-options=-fdump-tree-optimized { target { offload_target_nvptx || offload_target_amdgcn } } } // { dg-final { scan-tree-dump-times "omp_is_initial_device" 1 "gimple" } } // { dg-final { scan-tree-dump-times "_GLOBAL__off_I_v1" 1 "gimple" } } diff --git a/libgomp/testsuite/libgomp.c++/static-aggr-constructor-destructor-2.C b/libgomp/testsuite/libgomp.c++/static-aggr-constructor-destructor-2.C index 9652a721bbe..de481aadd34 100644 --- a/libgomp/testsuite/libgomp.c++/static-aggr-constructor-destructor-2.C +++ b/libgomp/testsuite/libgomp.c++/static-aggr-constructor-destructor-2.C @@ -1,6 +1,6 @@ // { dg-do run } // { dg-additional-options "-fdump-tree-gimple -fdump-tree-optimized" } -// { dg-additional-options -foffload-options=-fdump-tree-optimized { target { offload_device_nvptx || offload_target_amdgcn } } } +// { dg-additional-options -foffload-options=-fdump-tree-optimized { target { offload_target_nvptx || offload_target_amdgcn } } } // { dg-final { scan-tree-dump-times "omp_is_initial_device" 1 "gimple" } } // { dg-final { scan-tree-dump-times "_GLOBAL__off_I_v1" 1 "gimple" } } diff --git a/libgomp/testsuite/libgomp.c-c++-common/target-is-initial-host-2.c b/libgomp/testsuite/libgomp.c-c++-common/target-is-initial-host-2.c index 313d188a871..eabc394c8cf 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/target-is-initial-host-2.c +++ b/libgomp/testsuite/libgomp.c-c++-common/target-is-initial-host-2.c @@ -4,7 +4,7 @@ /* Check whether 'omp_is_initial_device()' is NOT compile-time optimized. */ /* { dg-additional-options "-fdump-tree-gimple -fdump-tree-optimized" } */ -/* { dg-additional-options -foffload-options=-fdump-tree-optimized { target { offload_device_nvptx || offload_target_amdgcn } } } */ +/* { dg-additional-options -foffload-options=-fdump-tree-optimized { target { offload_target_nvptx || offload_target_amdgcn } } } */ /* { dg-final { scan-tree-dump-times "omp_is_initial_device" 1 "gimple" } } */ diff --git a/libgomp/testsuite/libgomp.c-c++-common/target-is-initial-host.c b/libgomp/testsuite/libgomp.c-c++-common/target-is-initial-host.c index 423727ce55f..3b1283a5979 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/target-is-initial-host.c +++ b/libgomp/testsuite/libgomp.c-c++-common/target-is-initial-host.c @@ -3,7 +3,7 @@ /* Check whether 'omp_is_initial_device()' is properly compile-time optimized. */ /* { dg-additional-options "-fdump-tree-gimple -fdump-tree-optimized" } */ -/* { dg-additional-options -foffload-options=-fdump-tree-optimized { target { offload_device_nvptx || offload_target_amdgcn } } } */ +/* { dg-additional-options -foffload-options=-fdump-tree-optimized { target { offload_target_nvptx || offload_target_amdgcn } } } */ /* { dg-final { scan-tree-dump-times "omp_is_initial_device" 1 "gimple" } } */ diff --git a/libgomp/testsuite/libgomp.fortran/target-is-initial-host-2.f90 b/libgomp/testsuite/libgomp.fortran/target-is-initial-host-2.f90 index e06ced20645..56521044eb6 100644 --- a/libgomp/testsuite/libgomp.fortran/target-is-initial-host-2.f90 +++ b/libgomp/testsuite/libgomp.fortran/target-is-initial-host-2.f90 @@ -3,7 +3,7 @@ ! Check whether 'omp_is_initial_device()' is NOT compile-time optimized. */ ! { dg-additional-options "-fdump-tree-gimple -fdump-tree-optimized" } -! { dg-additional-options -foffload-options=-fdump-tree-optimized { target { offload_device_nvptx || offload_target_amdgcn } } } +! { dg-additional-options -foffload-options=-fdump-tree-optimized { target { offload_target_nvptx || offload_target_amdgcn } } } ! { dg-final { scan-tree-dump-times "omp_is_initial_device" 1 "gimple" } } diff --git a/libgomp/testsuite/libgomp.fortran/target-is-initial-host.f b/libgomp/testsuite/libgomp.fortran/target-is-initial-host.f index fec4a3f1c1c..34b327e3901 100644 --- a/libgomp/testsuite/libgomp.fortran/target-is-initial-host.f +++ b/libgomp/testsuite/libgomp.fortran/target-is-initial-host.f @@ -1,7 +1,7 @@ ! Check whether 'omp_is_initial_device()' is properly compile-time optimized. */ ! { dg-additional-options "-fdump-tree-gimple -fdump-tree-optimized" } -! { dg-additional-options -foffload-options=-fdump-tree-optimized { target { offload_device_nvptx || offload_target_amdgcn } } } +! { dg-additional-options -foffload-options=-fdump-tree-optimized { target { offload_target_nvptx || offload_target_amdgcn } } } ! { dg-final { scan-tree-dump-times "omp_is_initial_device" 1 "gimple" } } diff --git a/libgomp/testsuite/libgomp.fortran/target-is-initial-host.f90 b/libgomp/testsuite/libgomp.fortran/target-is-initial-host.f90 index f8a645fc488..bed99635d42 100644 --- a/libgomp/testsuite/libgomp.fortran/target-is-initial-host.f90 +++ b/libgomp/testsuite/libgomp.fortran/target-is-initial-host.f90 @@ -1,7 +1,7 @@ ! Check whether 'omp_is_initial_device()' is properly compile-time optimized. */ ! { dg-additional-options "-fdump-tree-gimple -fdump-tree-optimized" } -! { dg-additional-options -foffload-options=-fdump-tree-optimized { target { offload_device_nvptx || offload_target_amdgcn } } } +! { dg-additional-options -foffload-options=-fdump-tree-optimized { target { offload_target_nvptx || offload_target_amdgcn } } } ! { dg-final { scan-tree-dump-times "omp_is_initial_device" 1 "gimple" } } -- 2.34.1