From patchwork Tue Dec 1 12:27:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 57485 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp2136359lbb; Tue, 1 Dec 2015 04:27:51 -0800 (PST) X-Received: by 10.98.13.156 with SMTP id 28mr78648864pfn.106.1448972871315; Tue, 01 Dec 2015 04:27:51 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id r68si11615759pfi.233.2015.12.01.04.27.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Dec 2015 04:27:51 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-415902-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gcc-patches-return-415902-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-415902-patch=linaro.org@gcc.gnu.org; dkim=pass header.i=@gcc.gnu.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; q=dns; s=default; b=tDVsdPSDno29iRjIce kdqsbC5TfIBGKkhJvvOAUncCSzaGXGn0SlqA0HT/mfPmibue7QSHXdEAp4vtSHC1 vfWBfRiyx4R/QZQjGj34j59lMbpGm0/fMkMXE81Uul7n1fS7gjS+eLy71toCCdPZ Rk9VvJMRVBz27a84Ua5w+AUMY= 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 :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; s=default; bh=3t+wFJWZmE/QpAgSVUw+Rfb9 gkQ=; b=VOX85u3p/JzjcDO3OK89FKycYNW4Qe0vS5GywjVGmGA1j20KHlQBbdLY mNpz6zatJwMTu4iee2cLVOzJIZRBSQH/NXBgEjzPEXaECY2FbqRE7QTqXkrni0ih DO+95XnhwvaJA/aXUh58keKZSkU8gSk6xuwk1MBr9r7K6DI+EbA= Received: (qmail 105089 invoked by alias); 1 Dec 2015 12:27:40 -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 105077 invoked by uid 89); 1 Dec 2015 12:27:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=BAYES_00, KAM_ASCII_DIVIDERS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=no 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; Tue, 01 Dec 2015 12:27:38 +0000 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42071) by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1a3k1w-0007DS-H7 for gcc-patches@gnu.org; Tue, 01 Dec 2015 07:27:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a3k1u-00022d-TK for gcc-patches@gnu.org; Tue, 01 Dec 2015 07:27:36 -0500 Received: from mail-qg0-x231.google.com ([2607:f8b0:400d:c04::231]:35969) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3k1u-00022C-OL for gcc-patches@gnu.org; Tue, 01 Dec 2015 07:27:34 -0500 Received: by qgcc31 with SMTP id c31so3014044qgc.3 for ; Tue, 01 Dec 2015 04:27:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=dgFjDxObcimSGV68L9K+MmiOLM5C1AQ6X+7soGeR6QY=; b=REGe4ex3LzqSxOvpRZa7FxEsQD5gg/Tj6wien3wmAgLLZfobtz53bZ6UdwqK3IqP4F afGDPMJ5b6Aj7RmsR62lviO9T4tTwNgD4HcfXiWQu9XQhSDuBvrRdmayp7BQg4cDzE4q pbEMkAyQiMbef/z/pTeGdddTn2toHA4BEADUcVN97cNlXNmwnNGIq583Z3tkiVYP0ixT DxJfmgQHO/mmYLvS7SHesSZHX4a5ooKpscIiIITJwyBWdiLYlvr2jYLO2530F+lSCIAz D/qS8cjovDRhHWauyF1uI/eDrqcxAG2NbKMp2Cr4kI2ATMNtlcaWvxSKS+PPvBF8PgD5 9qZw== X-Gm-Message-State: ALoCoQnP1X/Czma/k2FYqp+b2vzvZDT63CSrxi1AKDefZ0/FLd+xWt4v1vRzUg4L5yxQlEp1BD8u MIME-Version: 1.0 X-Received: by 10.140.171.9 with SMTP id r9mr70973281qhr.93.1448972852179; Tue, 01 Dec 2015 04:27:32 -0800 (PST) Received: by 10.140.82.137 with HTTP; Tue, 1 Dec 2015 04:27:32 -0800 (PST) In-Reply-To: <565C8DA4.4030401@mentor.com> References: <565C0F47.5020604@mentor.com> <565C3CEC.9040209@mentor.com> <565C7B09.6000206@mentor.com> <20151130164855.GH5675@tucnak.redhat.com> <565C8DA4.4030401@mentor.com> Date: Tue, 1 Dec 2015 13:27:32 +0100 Message-ID: Subject: Re: [PATCH, PR46032] Handle BUILT_IN_GOMP_PARALLEL in ipa-pta From: Christophe Lyon To: Tom de Vries Cc: Jakub Jelinek , Richard Biener , "gcc-patches@gnu.org" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400d:c04::231 X-IsSubscribed: yes On 30 November 2015 at 18:55, Tom de Vries wrote: > On 30/11/15 17:48, Jakub Jelinek wrote: >> >> On Mon, Nov 30, 2015 at 05:36:25PM +0100, Tom de Vries wrote: >>> >>> +int >>> +main (void) >>> +{ >>> + unsigned results[nEvents]; >>> + unsigned pData[nEvents]; >>> + unsigned coeff = 2; >>> + >>> + init (&results[0], &pData[0]); >>> + >>> +#pragma omp parallel for >>> + for (int idx = 0; idx < (int)nEvents; idx++) >>> + results[idx] = coeff * pData[idx]; >> >> >> Could you please add another testcase, where you have say pData >> and some other pointer that init sets to alias with pData, and verify >> that such loop (would need to be say normal loop inside #pragma omp single >> or master) is not vectorized? > > > I've: > - added a simpler (not vectorizer-based) version of the testcase as > pr46032-2.c, and > - copied pr46032-2.c to pr46032-3.c and modified it such that two > pointers are aliasing > > Committed to trunk. > Hi, I've committed the attached patch as obvious: it adds dg-require-effective-target fopenmp to these new tests so that they are skipped e.g. on arm bare-metal targets (using newlib). Note that pr46032.c has some failures: FAIL: gcc.dg/pr46032.c scan-tree-dump-times vect "note: vectorized 1 loop" 1 on arm-none-linux-gnueabi, on arm-none-linux-gnueabihf with -mfpu=vfp*, and on armeb-none-linux-gnueabihf I haven't looked at the details yet; see http://people.linaro.org/~christophe.lyon/cross-validation/gcc/trunk/231076/report-build-info.html for more information. Thanks, Christophe. 2015-12-01 Christophe Lyon * gcc.dg/pr46032.c: Add dg-require-effective-target fopenmp. * gcc.dg/pr46032-2.c: Likewise. * gcc.dg/pr46032-3.c: Likewise. > Thanks, > - Tom > Index: gcc/testsuite/gcc.dg/pr46032-2.c =================================================================== --- gcc/testsuite/gcc.dg/pr46032-2.c (revision 231108) +++ gcc/testsuite/gcc.dg/pr46032-2.c (working copy) @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target fopenmp } */ /* { dg-options "-O2 -fopenmp -std=c99 -fipa-pta -fdump-tree-optimized" } */ #define N 2 Index: gcc/testsuite/gcc.dg/pr46032-3.c =================================================================== --- gcc/testsuite/gcc.dg/pr46032-3.c (revision 231108) +++ gcc/testsuite/gcc.dg/pr46032-3.c (working copy) @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target fopenmp } */ /* { dg-options "-O2 -fopenmp -std=c99 -fipa-pta -fdump-tree-optimized" } */ #define N 2 Index: gcc/testsuite/gcc.dg/pr46032.c =================================================================== --- gcc/testsuite/gcc.dg/pr46032.c (revision 231108) +++ gcc/testsuite/gcc.dg/pr46032.c (working copy) @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target fopenmp } */ /* { dg-options "-O2 -fopenmp -ftree-vectorize -std=c99 -fipa-pta -fdump-tree-vect-all" } */ extern void abort (void);