From patchwork Mon Oct 21 10:13:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Andre Vieira (lists)" X-Patchwork-Id: 1180451 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-511407-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="x7gcvQyj"; dkim-atps=neutral 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 46xXXH3Vq0z9sCJ for ; Mon, 21 Oct 2019 21:13:17 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=ZFmCaCYgwC1ic0+kDJZoPQaAZ1pqhXwf1p3ukqVOIx/VwieaY8 1IswVGdlZiSA5yyrhvd4ZGfg8FbyodaYCQYcDVOT+UVssM02FQRanFntAQDSUSDK SnLiKb+rxN9qx+XC0qDBrMg+kq6wmhbT32ctj65R3vnH+CXyinrf5+Emg= 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:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=ykrzZcxcJ8LFvHbaDpC3Fs2t1yg=; b=x7gcvQyjl7ptvSE2nf63 UgEGfvwXKchEC06y4FT50CALjcOfaYsBuaS51RQQne1WPCugc306jtIl1eCmJpzj yleup8oh/bTAUFlPZSfaTx5OKgkJ9lxEZn0jfXELrXwNzQkG80jQGv4wZ4gfzEyZ hD77F99sybOuIqB84l07cRQ= Received: (qmail 93563 invoked by alias); 21 Oct 2019 10:13:11 -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 93554 invoked by uid 89); 21 Oct 2019 10:13:10 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy= X-HELO: foss.arm.com Received: from Unknown (HELO foss.arm.com) (217.140.110.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 21 Oct 2019 10:13:09 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 659461650 for ; Mon, 21 Oct 2019 03:13:02 -0700 (PDT) Received: from [10.2.206.37] (e107157-lin.cambridge.arm.com [10.2.206.37]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2BF2D3F718 for ; Mon, 21 Oct 2019 03:13:02 -0700 (PDT) To: gcc-patches From: "Andre Vieira (lists)" Subject: [committed][vect] Only change base alignment if more restrictive Message-ID: Date: Mon, 21 Oct 2019 11:13:01 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 X-IsSubscribed: yes Hi all, This patch was pre-approved by richi. This patch makes sure ensure_base_align only changes alignment if the new alignment is more restrictive. It already did this if we were dealing with symbols, but it now does it for all types of declarations. Committed in revision r277238. Cheers, Andre 2019-10-21 Andre Vieira * tree-vect-stmts (ensure_base_align): Only change alignment if new alignment is more restrictive. diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index e606945d536ad3353b2317aed5b504a89eec9fc3..a3f99eecdf0976147ddd48725d62b9f18aea08cd 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -6288,7 +6288,7 @@ ensure_base_align (dr_vec_info *dr_info) if (decl_in_symtab_p (base_decl)) symtab_node::get (base_decl)->increase_alignment (align_base_to); - else + else if (DECL_ALIGN (base_decl) < align_base_to) { SET_DECL_ALIGN (base_decl, align_base_to); DECL_USER_ALIGN (base_decl) = 1;