From patchwork Tue Jul 7 13:31:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 492255 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 5DF231402B3 for ; Tue, 7 Jul 2015 23:31:31 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=qKRJNHTx; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; q=dns; s=default; b=Sb1OJLcN+DvGOu8l +PdfB4Hz7IExjAaz6HLAcLDZS/jjtyB4nte5CtiLkDUzJi9urAOM8RHoXOO6JbPk MCev1qQ5IZRABpnuoQPN0+OZR5onGJ72mMAmQ7Cs/PHBO46RHUwKC9+xOjtUkjjF IvmUzJUHnf0KyDCitdodj120f9E= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=default; bh=7XwDSS6dIKA2GMJBts6S/x lXhoY=; b=qKRJNHTxuc2EY7pmXw26xLOtZ9lmoQKbm4mnZ32rVKFbgv67iynH+Y Vy6PTM1pvUlwcJe7k9fQ/8fRI3Z1l6WL2zV3UJYLv8mqQT426ODRp1dRo1wyOv1I s0cLPqIPWR/UGGdsfs4Fz5rdCaPtdWavDMj24xIh3pEvxRcigY67w= Received: (qmail 56390 invoked by alias); 7 Jul 2015 13:31:24 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 56380 invoked by uid 89); 7 Jul 2015 13:31:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL, BAYES_50, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 07 Jul 2015 13:31:17 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1ZCSxt-0000q5-Qa from Thomas_Schwinge@mentor.com for gcc-patches@gcc.gnu.org; Tue, 07 Jul 2015 06:31:14 -0700 Received: from feldtkeller.schwinge.homeip.net (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.3.224.2; Tue, 7 Jul 2015 14:31:12 +0100 From: Thomas Schwinge To: Nathan Sidwell , GCC Patches CC: Julian Brown , Cesar Philippidis , Bernd Schmidt Subject: [gomp4] libgomp: Remove C-only XFAILs added in "Tune XFAILs" (was: openacc id builtin) In-Reply-To: <558D480D.9050602@acm.org> References: <558D480D.9050602@acm.org> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) Date: Tue, 7 Jul 2015 15:31:06 +0200 Message-ID: <87y4is5c2t.fsf@kepler.schwinge.homeip.net> MIME-Version: 1.0 Hi! On Fri, 26 Jun 2015 08:39:41 -0400, Nathan Sidwell wrote: > I discovered a latent bug in the openacc thread id builtin and associated > unspec. They should not be treated as constant functions, because that causes > the compiler to consider them constant across threads. Which of course they are > not. > > Applied to gomp4 branch Apparently, your change: > * config/nvptx/nvptx.md (UNSPEC_ID): Rename to ... > (UNSPECV_ID): ... here. > (oacc_id): Make volatile. > * omp-builtins.def (BUILT_IN_GOACC_ID): Not a constant function. > --- config/nvptx/nvptx.md (revision 224987) > +++ config/nvptx/nvptx.md (working copy) > @@ -50,7 +50,6 @@ > UNSPEC_ALLOCA > > UNSPEC_NID > - UNSPEC_ID > > UNSPEC_SHARED_DATA > ]) > @@ -61,6 +60,7 @@ > UNSPECV_XCHG > UNSPECV_WARP_BCAST > UNSPECV_BARSYNC > + UNSPECV_ID > ]) > > (define_attr "subregs_ok" "false,true" > @@ -1313,7 +1313,8 @@ > > (define_insn "oacc_id" > [(set (match_operand:SI 0 "nvptx_register_operand" "") > - (unspec:SI [(match_operand:SI 1 "const_int_operand" "")] UNSPEC_ID))] > + (unspec_volatile:SI [(match_operand:SI 1 "const_int_operand" "")] > + UNSPECV_ID))] > "" > { > static const char *const asms[] = > --- omp-builtins.def (revision 224987) > +++ omp-builtins.def (working copy) > @@ -62,7 +62,7 @@ DEF_GOACC_BUILTIN (BUILT_IN_GOACC_WAIT, > BT_FN_VOID_INT_INT_VAR, > ATTR_NOTHROW_LIST) > DEF_GOACC_BUILTIN (BUILT_IN_GOACC_ID, "GOACC_id", > - BT_FN_UINT_UINT, ATTR_CONST_NOTHROW_LEAF_LIST) > + BT_FN_UINT_UINT, ATTR_NOTHROW_LEAF_LIST) > DEF_GOACC_BUILTIN (BUILT_IN_GOACC_NID, "GOACC_nid", > BT_FN_UINT_UINT, ATTR_CONST_NOTHROW_LEAF_LIST) > DEF_GOACC_BUILTIN (BUILT_IN_GOACC_GET_GANGLOCAL_PTR, "GOACC_get_ganglocal_ptr", ... was not just to fix »a latent bug«, but instead I found your changes to cure the C-only XFAILs that we had applied earlier, , so I removed the XFAILs in r225515 -- but I have not made an attempt to understand why C and C++ did behave differently, what's (been) going on... :-/ commit 72e6113ce537cdaaf562b579becaada5e91f4fea Author: tschwinge Date: Tue Jul 7 13:27:34 2015 +0000 libgomp: Remove C-only XFAILs added in "Tune XFAILs" This removes the C-only XFAILs of r224614, which disappeared as of r225010. libgomp/ * testsuite/libgomp.oacc-c++/c++.exp (check_effective_target_c): Remove procedure. * testsuite/libgomp.oacc-c/c.exp (check_effective_target_c): Likewise. * testsuite/libgomp.oacc-c-c++-common/private-vars-local-worker-1.c: Remove/tune XFAILs. * testsuite/libgomp.oacc-c-c++-common/private-vars-local-worker-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/private-vars-local-worker-4.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/private-vars-loop-gang-3.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-3.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-4.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/private-vars-par-gang-3.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gomp-4_0-branch@225515 138bc75d-0d04-0410-961f-82ee72b054a4 --- libgomp/ChangeLog.gomp | 21 +++++++++++++++++++++ libgomp/testsuite/libgomp.oacc-c++/c++.exp | 4 ---- .../private-vars-local-worker-1.c | 2 -- .../private-vars-local-worker-2.c | 2 -- .../private-vars-local-worker-4.c | 1 - .../private-vars-loop-gang-3.c | 6 ------ .../private-vars-loop-worker-2.c | 2 -- .../private-vars-loop-worker-3.c | 2 -- .../private-vars-loop-worker-4.c | 2 -- .../private-vars-par-gang-3.c | 2 -- libgomp/testsuite/libgomp.oacc-c/c.exp | 4 ---- 11 files changed, 21 insertions(+), 27 deletions(-) Grüße, Thomas diff --git libgomp/ChangeLog.gomp libgomp/ChangeLog.gomp index 5f3dfaf..418474d 100644 --- libgomp/ChangeLog.gomp +++ libgomp/ChangeLog.gomp @@ -1,5 +1,26 @@ 2015-07-07 Thomas Schwinge + * testsuite/libgomp.oacc-c++/c++.exp (check_effective_target_c): + Remove procedure. + * testsuite/libgomp.oacc-c/c.exp (check_effective_target_c): + Likewise. + * testsuite/libgomp.oacc-c-c++-common/private-vars-local-worker-1.c: + Remove/tune XFAILs. + * testsuite/libgomp.oacc-c-c++-common/private-vars-local-worker-2.c: + Likewise. + * testsuite/libgomp.oacc-c-c++-common/private-vars-local-worker-4.c: + Likewise. + * testsuite/libgomp.oacc-c-c++-common/private-vars-loop-gang-3.c: + Likewise. + * testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-2.c: + Likewise. + * testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-3.c: + Likewise. + * testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-4.c: + Likewise. + * testsuite/libgomp.oacc-c-c++-common/private-vars-par-gang-3.c: + Likewise. + * testsuite/libgomp.oacc-c-c++-common/reduction-4.c: dg-xfail-run-if openacc_nvidia_accel_selected. diff --git libgomp/testsuite/libgomp.oacc-c++/c++.exp libgomp/testsuite/libgomp.oacc-c++/c++.exp index 80cb317..60f582b 100644 --- libgomp/testsuite/libgomp.oacc-c++/c++.exp +++ libgomp/testsuite/libgomp.oacc-c++/c++.exp @@ -14,10 +14,6 @@ if [info exists lang_include_flags] then { unset lang_include_flags } -proc check_effective_target_c { } { - return 0 -} - # If a testcase doesn't have special options, use these. if ![info exists DEFAULT_CFLAGS] then { set DEFAULT_CFLAGS "-O2" diff --git libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-local-worker-1.c libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-local-worker-1.c index 957f827..67a1518 100644 --- libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-local-worker-1.c +++ libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-local-worker-1.c @@ -1,5 +1,3 @@ -/* { dg-xfail-run-if "TODO" { c && openacc_nvidia_accel_selected } { "*" } { "" } } */ - #include /* Test of worker-private variables declared in a local scope, broadcasting diff --git libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-local-worker-2.c libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-local-worker-2.c index 5bf3e16..0ee87be 100644 --- libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-local-worker-2.c +++ libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-local-worker-2.c @@ -1,5 +1,3 @@ -/* { dg-xfail-run-if "TODO" { c && openacc_nvidia_accel_selected } { "*" } { "" } } */ - #include /* Test of worker-private variables declared in a local scope, broadcasting diff --git libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-local-worker-4.c libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-local-worker-4.c index 118dae8..4cec00e 100644 --- libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-local-worker-4.c +++ libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-local-worker-4.c @@ -1,4 +1,3 @@ -/* { dg-xfail-if "TODO" { c } } */ /* { dg-xfail-run-if "TODO" { openacc_nvidia_accel_selected } { "*" } { "" } } */ #include diff --git libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-loop-gang-3.c libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-loop-gang-3.c index bc96f0d..0a77869 100644 --- libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-loop-gang-3.c +++ libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-loop-gang-3.c @@ -1,9 +1,3 @@ -/* { dg-xfail-run-if "TODO" { c && openacc_nvidia_accel_selected } { "*" } { "" } } */ -/* Fails as of gomp-4_0-branch r224586, but for C only: - - private-vars-loop-gang-3.exe: [...]/private-vars-loop-gang-3.c:28: main: Assertion `arr[i] == i + (i / 32) * 2' failed. -*/ - #include /* Test of gang-private variables declared on loop directive, with broadcasting diff --git libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-2.c libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-2.c index a5f16d8..3227700 100644 --- libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-2.c +++ libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-2.c @@ -1,5 +1,3 @@ -/* { dg-xfail-run-if "TODO" { c && openacc_nvidia_accel_selected } { "*" } { "" } } */ - #include /* Test of worker-private variables declared on a loop directive, broadcasting diff --git libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-3.c libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-3.c index 5c75f4d..65d5d4f 100644 --- libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-3.c +++ libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-3.c @@ -1,5 +1,3 @@ -/* { dg-xfail-run-if "TODO" { c && openacc_nvidia_accel_selected } { "*" } { "" } } */ - #include /* Test of worker-private variables declared on a loop directive, broadcasting diff --git libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-4.c libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-4.c index f0d1309..42a12b2 100644 --- libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-4.c +++ libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-4.c @@ -1,5 +1,3 @@ -/* { dg-xfail-run-if "TODO" { c && openacc_nvidia_accel_selected } { "*" } { "" } } */ - #include /* Test of worker-private variables declared on a loop directive, broadcasting diff --git libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-par-gang-3.c libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-par-gang-3.c index c580d68..e5cd6fa 100644 --- libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-par-gang-3.c +++ libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-par-gang-3.c @@ -1,5 +1,3 @@ -/* { dg-xfail-run-if "TODO" { c && openacc_nvidia_accel_selected } { "*" } { "" } } */ - #include /* Test of gang-private array variable declared on the parallel directive. */ diff --git libgomp/testsuite/libgomp.oacc-c/c.exp libgomp/testsuite/libgomp.oacc-c/c.exp index 15e8f81..8d54815 100644 --- libgomp/testsuite/libgomp.oacc-c/c.exp +++ libgomp/testsuite/libgomp.oacc-c/c.exp @@ -19,10 +19,6 @@ if ![info exists DEFAULT_CFLAGS] then { set DEFAULT_CFLAGS "-O2" } -proc check_effective_target_c { } { - return 1 -} - # Initialize dg. dg-init