From patchwork Mon Sep 16 16:50:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 275245 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 did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 2C5E22C00C5 for ; Tue, 17 Sep 2013 02:50:43 +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:cc:subject:message-id:reply-to:mime-version :content-type; q=dns; s=default; b=BNka9te+Cm6pROxhkpW+xppyfMk9d QtwJlfZuYhOpoQaASphta8RllhdoOVnp88ghV1oup8ZDjtuxZqpxGNbYmw99cNso s8sxUemkHODqvFDe1TkNmq0LZOO7Ds+Y0FGom/bEPWoNF/fKk+heraYKt50N3MQP /vXWuCDnc4J628= 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:cc:subject:message-id:reply-to:mime-version :content-type; s=default; bh=ZaMMiVxUsnI+NNInEFgTqV/xeGE=; b=SPj 8V6/IGbWRhTYLPdH2gZK12SCQ+xcS9UPQ9gHxXE90/0d0k+RF/ZzTJ9YCQyQi9yR fDUe53KjWIrwMC213ZM/fHvFb+DAiZ1L1PAosrA8A2cteknuyEczSyVGx+1cHcqg QYtyCMeA5MKmZi/uXALIHJ834yIty5sGZKLkAEBU= Received: (qmail 8097 invoked by alias); 16 Sep 2013 16:50:36 -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 8084 invoked by uid 89); 16 Sep 2013 16:50:36 -0000 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; Mon, 16 Sep 2013 16:50:36 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r8GGoXZ1029727 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 16 Sep 2013 12:50:33 -0400 Received: from tucnak.zalov.cz (vpn1-5-49.ams2.redhat.com [10.36.5.49]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r8GGoV8Z010962 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 16 Sep 2013 12:50:32 -0400 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.14.7/8.14.7) with ESMTP id r8GGoUPm020079; Mon, 16 Sep 2013 18:50:30 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.14.7/8.14.7/Submit) id r8GGoUKc020078; Mon, 16 Sep 2013 18:50:30 +0200 Date: Mon, 16 Sep 2013 18:50:30 +0200 From: Jakub Jelinek To: Richard Biener Cc: gcc-patches@gcc.gnu.org Subject: [gomp4, trunk] Two simd fixes Message-ID: <20130916165030.GT1817@tucnak.redhat.com> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Hi! This patch fixes two issues I found on the pr58392.c testcase: 1) we weren't copying decl attributes, so e.g. inside #pragma omp parallel "omp simd array" temporary arrays lost their attribute and weren't adjusted because of that 2) DR_ALIGNED_TO wasn't reset after resetting DR_OFFSET on simd lane access DRs, which resulted in the vectorizer trying to peel for alignment on those. Those are always automatic vars that can be just aligned more. Ok? 2013-09-16 Jakub Jelinek * omp-low.c (copy_var_decl): Copy DECL_ATTRIBUTES. * tree-vect-data-refs.c (vect_analyze_data_refs): For simd_lane_access drs, update also DR_ALIGNED_TO. Jakub --- gcc/omp-low.c.jj 2013-09-16 10:08:43.000000000 +0200 +++ gcc/omp-low.c 2013-09-16 15:25:31.683903448 +0200 @@ -888,6 +888,7 @@ copy_var_decl (tree var, tree name, tree TREE_NO_WARNING (copy) = TREE_NO_WARNING (var); TREE_USED (copy) = 1; DECL_SEEN_IN_BIND_EXPR_P (copy) = 1; + DECL_ATTRIBUTES (copy) = DECL_ATTRIBUTES (var); return copy; } --- gcc/tree-vect-data-refs.c.jj 2013-09-13 16:48:28.000000000 +0200 +++ gcc/tree-vect-data-refs.c 2013-09-16 14:47:56.500538758 +0200 @@ -3039,6 +3039,9 @@ again: { DR_OFFSET (newdr) = ssize_int (0); DR_STEP (newdr) = step; + DR_ALIGNED_TO (newdr) + = size_int (highest_pow2_factor + (DR_OFFSET (newdr))); dr = newdr; simd_lane_access = true; }