From patchwork Sat Nov 2 13:25:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Aldy Hernandez X-Patchwork-Id: 287982 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)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 99AEC2C00AD for ; Sun, 3 Nov 2013 00:25:54 +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 :message-id:date:from:mime-version:to:cc:subject:content-type; q=dns; s=default; b=dfYPMBxU8iJJPu+xOJsCWGD//+lSHFxju6lEUMpeclm LIinbQisf/K6J1eiiUsj8TuBHMLviMfKHZ7QQcYaQKNETVXCGPGZJoKfID8jRmAe vHdQ8av76Bp8CpChRXwluF5BH8q2OC9Ka2fIq1j5Wdyv14RLf+6fZklBD3bK2XTA = 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:cc:subject:content-type; s=default; bh=qL4+o5t+aneOM1Jm5JFRw+VUkRw=; b=i+uq2lZ/7v7CArBzJ 5kKg7wUkuatHubg2hg6kHRKP46BRBZqhh1s7bBsBlB1szdxF+1dt51cku5flIIO9 nfWIMuZd0M/r5Ji1iiYqjuoLyJrTcolRgk4wlPgGJ5WblZbr3TlGrCvFQVRg+6ws 3YXxTycdMqJ0xQDTdjM47R79Q0= Received: (qmail 30487 invoked by alias); 2 Nov 2013 13:25:47 -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 30475 invoked by uid 89); 2 Nov 2013 13:25:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 02 Nov 2013 13:25:45 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rA2DPhx5017188 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 2 Nov 2013 09:25:44 -0400 Received: from reynosa.quesejoda.com (vpn-53-10.rdu2.redhat.com [10.10.53.10]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id rA2DPb6J022460; Sat, 2 Nov 2013 09:25:39 -0400 Message-ID: <5274FD48.3060303@redhat.com> Date: Sat, 02 Nov 2013 08:25:28 -0500 From: Aldy Hernandez User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Jakub Jelinek CC: "Iyer, Balaji V" , gcc-patches Subject: [gomp4] mangle linear step of 1 with just 'l' Hi Jakub. Your patch mangling negative linear steps caused a regression in simd-clones-2.c. Well, it already had a failure, but now it has two :). The problem is that AFAIU, a linear step of 1, is mangled with just 'l', not 'l1'. I am not completely sure of this, and was hoping Balaji could clear this up, but on page 7 of the Intel vector ABI document, the example for: __declspec(vector(uniform(a), aligned(a:32), linear(k:1))) extern float setArray(float *a, float x, int k) ...is mangled as _ZGVxN4ua32vl_setArray, and in the subsequent explanatory paragraph, the document specifically says: ā€œlā€ indicates linear(k:1) ā€“ k is a linear variable whose stride is 1. However, since the spec itself says nothing about a default linear stride 1, I don't know whether this is an oversight in the BNF grammar or a typo in the example. Balaji? If a linear step of 1 is mangled as 'l' as the example suggests, then I'd like to commit the following patch. Aldy gcc/ChangeLog.gomp * omp-low.c (simd_clone_mangle): Linear step of 1 is mangled as 'l'. diff --git a/gcc/omp-low.c b/gcc/omp-low.c index d30fb17..e895cca 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -10825,9 +10825,9 @@ simd_clone_mangle (struct cgraph_node *old_node, struct cgraph_node *new_node) { gcc_assert (arg.linear_step != 0); pp_character (&pp, 'l'); - if (arg.linear_step > 0) + if (arg.linear_step > 1) pp_unsigned_wide_integer (&pp, arg.linear_step); - else + else if (arg.linear_step < 0) { pp_character (&pp, 'n'); pp_unsigned_wide_integer (&pp, (-(unsigned HOST_WIDE_INT)