From patchwork Mon Jul 27 20:09:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 500640 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 6D755140307 for ; Tue, 28 Jul 2015 06:10:32 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=kSTRCbZ1; 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 :message-id:date:from:mime-version:to:subject:content-type; q= dns; s=default; b=BwpTo7hM8XDMFZCdhygmi5+HXtD/oG5PZ1hzYsdrxNrrSA VuPbvz0SeavpSiHXhNJNQmwsxJvBC1mRlx3CXJn1RsMpuP3dlBC3efaC1HKkydj5 dEO8rEK0voXgqXbWCewAtp3K17FSn1al59HBSq3kpk+Ou20Zjx94txmL13LVg= 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 :message-id:date:from:mime-version:to:subject:content-type; s= default; bh=ggxpU32zhDYf1IoIlQXnVWQ3B6E=; b=kSTRCbZ1v2Ovr5if8IiM c8/Onup2sornAxTl5kyNUwZ26itTBwlK+eCG6pmFkDmVIKFcLDtmhdj1kJRICUsw /ZIGUzUNywYGz+h+qZSSprfOwG5L24KWPzVzCCqk/kUg1uH2TuzMppBVrd8d+uuV MEh1xYM6ol8uMejbsxZrJP4= Received: (qmail 90446 invoked by alias); 27 Jul 2015 20:10:23 -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 90432 invoked by uid 89); 27 Jul 2015 20:10:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: fencepost.gnu.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (208.118.235.10) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 27 Jul 2015 20:10:20 +0000 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39214) by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ZJoj4-0005PL-1S for gcc-patches@gnu.org; Mon, 27 Jul 2015 16:10:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZJoiz-00031K-En for gcc-patches@gnu.org; Mon, 27 Jul 2015 16:10:17 -0400 Received: from relay1.mentorg.com ([192.94.38.131]:38111) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJoiz-0002xY-9L for gcc-patches@gnu.org; Mon, 27 Jul 2015 16:10:13 -0400 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 1ZJoiv-0004a0-7F from Tom_deVries@mentor.com for gcc-patches@gnu.org; Mon, 27 Jul 2015 13:10:09 -0700 Received: from [127.0.0.1] (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; Mon, 27 Jul 2015 21:09:55 +0100 Message-ID: <55B69000.9040602@mentor.com> Date: Mon, 27 Jul 2015 22:09:36 +0200 From: Tom de Vries User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: "gcc-patches@gnu.org" Subject: [committed] Update outer-4.c and uns-outer-4.c X-detected-operating-system: by eggs.gnu.org: Windows NT kernel [generic] [fuzzy] X-Received-From: 192.94.38.131 Hi, this patch cleans up testcases autopar/outer-4.c and autopar/uns-outer-4.c. Committed as obvious. Thanks, - Tom Update outer-4.c and uns-outer-4.c 2015-07-27 Tom de Vries * gcc.dg/autopar/outer-4.c (parloop): Remove superfluous noinline attribute. Update comment. (main): Remove. Add scan for not parallelizing inner loop. * gcc.dg/autopar/uns-outer-4.c (parloop): Remove superfluous noinline attribute. (main): Remove. --- gcc/testsuite/gcc.dg/autopar/outer-4.c | 19 +++++++------------ gcc/testsuite/gcc.dg/autopar/uns-outer-4.c | 11 +---------- 2 files changed, 8 insertions(+), 22 deletions(-) diff --git a/gcc/testsuite/gcc.dg/autopar/outer-4.c b/gcc/testsuite/gcc.dg/autopar/outer-4.c index 2027499..681cf85 100644 --- a/gcc/testsuite/gcc.dg/autopar/outer-4.c +++ b/gcc/testsuite/gcc.dg/autopar/outer-4.c @@ -6,15 +6,16 @@ void abort (void); int g_sum=0; int x[500][500]; -__attribute__((noinline)) -void parloop (int N) +void +parloop (int N) { int i, j; int sum; - /* Double reduction is currently not supported, outer loop is not - parallelized. Inner reduction is detected, inner loop is - parallelized. */ + /* The inner reduction is not recognized as reduction because we cannot assume + that int wraps on overflow. The way to fix this is to implement the + reduction operation in unsigned type, but we've not yet implemented + this. */ sum = 0; for (i = 0; i < N; i++) for (j = 0; j < N; j++) @@ -23,13 +24,7 @@ void parloop (int N) g_sum = sum; } -int main(void) -{ - parloop(500); - - return 0; -} - +/* { dg-final { scan-tree-dump-times "parallelizing inner loop" 0 "parloops" } } */ /* { dg-final { scan-tree-dump-times "parallelizing outer loop" 1 "parloops" { xfail *-*-* } } } */ /* { dg-final { scan-tree-dump-times "loopfn" 4 "optimized" { xfail *-*-* } } } */ diff --git a/gcc/testsuite/gcc.dg/autopar/uns-outer-4.c b/gcc/testsuite/gcc.dg/autopar/uns-outer-4.c index 8365a89..30ead25 100644 --- a/gcc/testsuite/gcc.dg/autopar/uns-outer-4.c +++ b/gcc/testsuite/gcc.dg/autopar/uns-outer-4.c @@ -6,7 +6,7 @@ void abort (void); unsigned int g_sum=0; unsigned int x[500][500]; -void __attribute__((noinline)) +void parloop (int N) { int i, j; @@ -23,14 +23,5 @@ parloop (int N) g_sum = sum; } -int -main (void) -{ - parloop (500); - - return 0; -} - - /* { dg-final { scan-tree-dump-times "parallelizing outer loop" 1 "parloops" { xfail *-*-* } } } */ /* { dg-final { scan-tree-dump-times "loopfn" 4 "optimized" } } */ -- 1.9.1