From patchwork Fri Dec 5 16:13:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jambor X-Patchwork-Id: 418169 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 1701C140119 for ; Sat, 6 Dec 2014 03:13:45 +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:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=cGlhrzX52qhFj5LBGY730n1cZLY0EWj7BMMt69t+++uSOvMQsPSjK AMqZa7wUl6dcPQ/1Fj8Ku9VDOcIdmWYTcRlrh/Q5QpVNyymBujmtMmJ4uJYDQnvA 2Afb1gr5LbKHPYaFw3VrQpGWCU2DUW8IPe2NgEuUhsswWlBgtWvSYU= 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=N9TE8JkE7uee2Jejgf14WsBFj1A=; b=jvRulOFMzgtWpapAvwLe o9Gw27p9t9CjRgwBuGe2gbkuLe/p3DHFiPKqbUo3JwxzKSaRGybL3s8dOao8YfPW C+ym9Rr7aoSt78l8aK5NL9TXZ9E1du5zIHLrC87Kjn57RDQFGoDwigebOX0vt07p Nm06MHTSRuzSDY0kslYvhXs= Received: (qmail 5822 invoked by alias); 5 Dec 2014 16:13:37 -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 5805 invoked by uid 89); 5 Dec 2014 16:13:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL, BAYES_00 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; Fri, 05 Dec 2014 16:13:36 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 0FC80AB07 for ; Fri, 5 Dec 2014 16:13:33 +0000 (UTC) Date: Fri, 5 Dec 2014 17:13:32 +0100 From: Martin Jambor To: GCC Patches Subject: [PATCH, PR 64192] Add forgotten conversion from bits to bytes Message-ID: <20141205161332.GX8214@virgil.suse> Mail-Followup-To: GCC Patches MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Hi, at some point I lost an important division of bit offset by BITS_PER_UNIT in my alignment IPA-CP propagation patch. That lead to a few failures on i686 reported as PR 64192. This patch adds it together with a slight improvement of the guarding check which I suppose will never trigger but it does ensure the division will never loose information. I consider this change obvious and would really like to commit it before I leave for the weekend, so I will do so after it finishes bootstrapping and testing on i686. It has already passed bootstrap and testing on x86_64-linux. Thanks, Martin 2014-12-05 Martin Jambor PR ipa/64192 * ipa-prop.c (ipa_compute_jump_functions_for_edge): Convert alignment from bits to bytes after checking they are byte-aligned. Index: src/gcc/ipa-prop.c =================================================================== --- src.orig/gcc/ipa-prop.c +++ src/gcc/ipa-prop.c @@ -1739,10 +1739,11 @@ ipa_compute_jump_functions_for_edge (str unsigned align; if (get_pointer_alignment_1 (arg, &align, &hwi_bitpos) - && align > BITS_PER_UNIT) + && align % BITS_PER_UNIT == 0 + && hwi_bitpos % BITS_PER_UNIT == 0) { jfunc->alignment.known = true; - jfunc->alignment.align = align; + jfunc->alignment.align = align / BITS_PER_UNIT; jfunc->alignment.misalign = hwi_bitpos / BITS_PER_UNIT; } else