From patchwork Tue May 28 11:35:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Hubicka X-Patchwork-Id: 246840 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 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id A3B322C02A9 for ; Tue, 28 May 2013 21:35:32 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=XWyO7TkGiD71kD8cALuHUw3BOvV0FMo6R+bQv7vkLde3xO9fhQt3O ghJ5Fhd+clfTq09omXczDx8jY3PXw+/hh+t4s9Bt2uJn2m4EmD5iSOlo4XARbsIW 9urkfrAxfdA+u2pH2kwuHmSLt1hTR832PtZCM/ZtudPpODFXEPLzbU= 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:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=AO5rHm3Y2OZ8njnJD6Ids2+XCec=; b=yulwOIJQNKRHV3AdYRSx 9bwW5gEjidgML5AMsksZe9buywmYlSLLOvnzYSzLfvuHR8cXIGJbx+lAN0uds8l0 sP237haZVgGikoIYX1qOMgAl/x16Jfzjncrw1BO05nPaVHH2ltqqGYO4y77u5Eqd 852Je6ycoZj24U9W02H0zV0= Received: (qmail 14381 invoked by alias); 28 May 2013 11:35:26 -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 14371 invoked by uid 89); 28 May 2013 11:35:26 -0000 X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD autolearn=ham version=3.3.1 Received: from nikam.ms.mff.cuni.cz (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 28 May 2013 11:35:21 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id DF98454308D; Tue, 28 May 2013 13:35:18 +0200 (CEST) Date: Tue, 28 May 2013 13:35:18 +0200 From: Jan Hubicka To: gcc-patches@gcc.gnu.org Subject: Fix testsuite/gcc.dg/vect/vect-strided-a-u16-i4.c Message-ID: <20130528113518.GB19416@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Hi, this testcase has volatile variable read to prevent vectorization but then it is shadowed by local var of the same name. Currently it prevents vectorization but not reliably (i.e. we can manage to optimize the conditional away from loop since it is invariant and that is what happens in my tree.) * gcc.dg/vect/vect-strided-a-u16-i4.c: Rename volatile variable to avoid shadowing. Index: testsuite/gcc.dg/vect/vect-strided-a-u16-i4.c =================================================================== --- testsuite/gcc.dg/vect/vect-strided-a-u16-i4.c (revision 199343) +++ testsuite/gcc.dg/vect/vect-strided-a-u16-i4.c (working copy) @@ -12,7 +12,7 @@ typedef struct { unsigned short d; } s; -volatile int y = 0; +volatile int yy = 0; __attribute__ ((noinline)) int main1 () @@ -29,7 +29,7 @@ main1 () arr[i].b = i * 2; arr[i].c = 17; arr[i].d = i+34; - if (y) /* Avoid vectorization. */ + if (yy) /* Avoid vectorization. */ abort (); }