From patchwork Fri Mar 7 20:21:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 328068 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 D680B2C00AC for ; Sat, 8 Mar 2014 07:22:09 +1100 (EST) 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=KPxh2l38GeBbq/1B x5l64AKuuTQvZqfZ8uAGV1kjA5CHELkK4XaQnexe9URtimd8nhpc4Jugh3zv09qS xBl9h/SZNTZCmRErmQkXoJpzYyhVNeMexTuQZNBD6jlNZNsb2bwrRg4VopxrS06a RddI70pustXWwzN66MlofB192kY= 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=JtqgBUgB9fjsL7mf/OQAjC a+sxc=; b=hxTYjIFUPbIApNkGOF4tZCZJxnezyXigsn6yaqblpp25Bdcga6cWlJ QMCXDgOH6Yxc+7AX8fkNVsGZQg9j/QFvqdgSOtm1QnA1q9AzXYvtKT5/jAmRZ4a7 v4dvq9Ufeq+xLr4S6kGCYwdnUWhYXfXI8B9kkOMvk4YA7CGAz24/E= Received: (qmail 28443 invoked by alias); 7 Mar 2014 20:22:02 -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 28425 invoked by uid 89); 7 Mar 2014 20:22:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL, BAYES_00 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; Fri, 07 Mar 2014 20:22:00 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1WM1HI-0006sK-CB from Thomas_Schwinge@mentor.com ; Fri, 07 Mar 2014 12:21:56 -0800 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Fri, 7 Mar 2014 12:21:56 -0800 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.2.247.3; Fri, 7 Mar 2014 20:21:54 +0000 From: Thomas Schwinge To: Aldy Hernandez , Jakub Jelinek CC: Jason Merrill , gcc-patches , "Iyer, Balaji V" Subject: Re: PING: Fwd: Re: [patch] implement Cilk Plus simd loops on trunk In-Reply-To: <528695CD.5080705@redhat.com> References: <521B8ECA.70806@redhat.com> <521D060E.9030601@redhat.com> <524C95F2.1010802@redhat.com> <52618287.8010705@redhat.com> <52740D59.50104@redhat.com> <5284FF25.7020401@redhat.com> <20131114170553.GD27813@tucnak.zalov.cz> <52850AB6.2070408@redhat.com> <20131114180147.GE27813@tucnak.zalov.cz> <5285790E.9050000@redhat.com> <20131115073757.GA892@tucnak.redhat.com> <52863CB4.50900@redhat.com> <528695CD.5080705@redhat.com> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/23.4.1 (i486-pc-linux-gnu) Date: Fri, 7 Mar 2014 21:21:48 +0100 Message-ID: <87bnxhlpyb.fsf@kepler.schwinge.homeip.net> MIME-Version: 1.0 Hi! On Fri, 15 Nov 2013 14:44:45 -0700, Aldy Hernandez wrote: > I fixed a few nits Jason pointed out off-line, and both him and Jakub > have approved the patch for trunk. > > In running the final round of tests I noticed a few problems with my > choice of bit numbers for the GF_OMP_* masks. I fixed them, and re-ran > tests on x86-64 Linux. > > Attached is the final version of the patch I have committed to trunk. > Date: Mon Oct 14 18:32:13 2013 -0500 > --- a/gcc/omp-low.c > +++ b/gcc/omp-low.c > @@ -3587,7 +3619,7 @@ lower_rec_input_clauses (tree clauses, gimple_seq *ilist, gimple_seq *dlist, > /* Don't add any barrier for #pragma omp simd or > #pragma omp distribute. */ > if (gimple_code (ctx->stmt) != GIMPLE_OMP_FOR > - || gimple_omp_for_kind (ctx->stmt) == GF_OMP_FOR_KIND_FOR) > + || gimple_omp_for_kind (ctx->stmt) & GF_OMP_FOR_KIND_FOR) > gimple_seq_add_stmt (ilist, build_omp_barrier (NULL_TREE)); > } Maybe it's just too late on a Friday evening, but I don't understand this change, part of r204863. GF_OMP_FOR_KIND_FOR has the value zero; shouldn't this comparison have remained unchanged? Is the following (untested) patch OK for trunk? Does this need a test case? commit f3c7834ecbedc50e04223d24b1b671fc8a62c169 Author: Thomas Schwinge Date: Fri Mar 7 21:11:43 2014 +0100 Restore check for OpenMP for construct. gcc/ * omp-low.c (lower_rec_input_clauses) : Restore check for GF_OMP_FOR_KIND_FOR. Grüße, Thomas diff --git gcc/omp-low.c gcc/omp-low.c index 4dc3956..713a4ae 100644 --- gcc/omp-low.c +++ gcc/omp-low.c @@ -3915,7 +3915,7 @@ lower_rec_input_clauses (tree clauses, gimple_seq *ilist, gimple_seq *dlist, /* Don't add any barrier for #pragma omp simd or #pragma omp distribute. */ if (gimple_code (ctx->stmt) != GIMPLE_OMP_FOR - || gimple_omp_for_kind (ctx->stmt) & GF_OMP_FOR_KIND_FOR) + || gimple_omp_for_kind (ctx->stmt) == GF_OMP_FOR_KIND_FOR) gimple_seq_add_stmt (ilist, build_omp_barrier (NULL_TREE)); }