From patchwork Wed Mar 11 15:08:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 449054 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 304EC14009B for ; Thu, 12 Mar 2015 02:09:16 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass reason="1024-bit key; unprotected key" header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=jFMbnEsn; dkim-adsp=none (unprotected policy); dkim-atps=neutral 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=cLtBWdALg0tjBB2jFi+xavIBOGU3XGWeDHtC2qh5YptK4D7zv+CMc Zhob7cQkx9YSVkdpFRu3Kw0YJ67rZRoLtbPBsVJET4hGo/FHkqJSsiTfZiLexWjv Vfo0UOga4vzKvFOFfRLDjf5psLudQ2K208c2SZpuGDnjSbPgZMirTY= 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=QaD1NK+LKQNmuxn7mNolcqmjAtk=; b=jFMbnEsn5JQG0z10XbmT w4SG05g8zuQqGF9H6XebhyNjajZHQ7Ap+9eIOEPc8nhPxLdI+e2bRgzA3jjm1gd1 WHsi8++wvYouE5OYioMF/cil/OKlEnUi1yeWrDatIVbV2O6V7ncM9QKULHGheBRS XVIVeoEHH+6vzGYncTU+GIU= Received: (qmail 110962 invoked by alias); 11 Mar 2015 15:09:06 -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 110947 invoked by uid 89); 11 Mar 2015 15:09:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx2.suse.de Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Wed, 11 Mar 2015 15:08:56 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 2A6BFAAC8 for ; Wed, 11 Mar 2015 15:08:53 +0000 (UTC) Date: Wed, 11 Mar 2015 16:08:53 +0100 (CET) From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix regression caused by PR65310 fix Message-ID: User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 This fixes a vectorizer testcase regression on powerpc where SRA drops alignment info unnecessarily. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2015-03-11 Richard Biener PR tree-optimization/65310 * tree-sra.c (build_ref_for_offset): Also preserve larger alignment. Index: gcc/tree-sra.c =================================================================== --- gcc/tree-sra.c (revision 221324) +++ gcc/tree-sra.c (working copy) @@ -1597,7 +1597,7 @@ build_ref_for_offset (location_t loc, tr misalign = (misalign + offset) & (align - 1); if (misalign != 0) align = (misalign & -misalign); - if (align < TYPE_ALIGN (exp_type)) + if (align != TYPE_ALIGN (exp_type)) exp_type = build_aligned_type (exp_type, align); mem_ref = fold_build2_loc (loc, MEM_REF, exp_type, base, off);