From patchwork Sat Mar 31 13:07:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 149829 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]) by ozlabs.org (Postfix) with SMTP id 222ADB6FAF for ; Sun, 1 Apr 2012 00:08:10 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1333804091; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:Received:Date:Message-ID:Subject:From:To: Cc:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=qs4x3nR 4sLdHemxCoi6znm7FD3c=; b=m4kqkFyLXCfTCp4Bad8TXZTiqF6TT/B0fQqAd/H gzl14qeNrGEHP5DBTEvUgL3mc7Q4x3MMmDbnCogDFF45LTXnLJGSWzcQAbfaleMs imJcrV6Z6MnGH/SFPvOKs9RQ/YoWyz36CEPNx06r8/qdS2rUSIwHGUHC2uQIvROm 3DZA= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:MIME-Version:Received:Received:Date:Message-ID:Subject:From:To:Cc:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=JnogWiMy3wkHV+KDfbNNOT0XBV2MFJgJwpssVGEWknJ7mSzFDUEQz8FbXQILAO KNvRoMVENUdMOvCCLNM1Dn7IvJf6rcN5Jm3+LjvEgzGhKGxP9oG2Ij6e95Dkzljk xAoU1pszY4epDT8UHv87BIXcezz673wN57LHcwgHmTIus=; Received: (qmail 438 invoked by alias); 31 Mar 2012 13:08:00 -0000 Received: (qmail 32623 invoked by uid 22791); 31 Mar 2012 13:07:57 -0000 X-SWARE-Spam-Status: No, hits=-4.1 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, TW_ZJ X-Spam-Check-By: sourceware.org Received: from mail-yw0-f47.google.com (HELO mail-yw0-f47.google.com) (209.85.213.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 31 Mar 2012 13:07:38 +0000 Received: by yhjj56 with SMTP id j56so804781yhj.20 for ; Sat, 31 Mar 2012 06:07:38 -0700 (PDT) MIME-Version: 1.0 Received: by 10.236.134.211 with SMTP id s59mr1577345yhi.131.1333199257987; Sat, 31 Mar 2012 06:07:37 -0700 (PDT) Received: by 10.146.124.5 with HTTP; Sat, 31 Mar 2012 06:07:37 -0700 (PDT) Date: Sat, 31 Mar 2012 15:07:37 +0200 Message-ID: Subject: [PATCH]: Restore alpha boostrap by partial revert From: Uros Bizjak To: gcc-patches@gcc.gnu.org Cc: Richard Guenther 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 Hello! Attached patch restores alpha bootstrap. 2012-03-31 Uros Bizjak Partially revert: 2012-03-29 Richard Guenther * rtl.h (extended_count): Remove. * combine.c (extended_count): Remove. Bootstrapped on alphaev68-pc-linux-gnu. OK for mainline? Uros. Index: combine.c =================================================================== --- combine.c (revision 186039) +++ combine.c (working copy) @@ -9674,6 +9674,31 @@ return NULL; } +/* Return the number of "extended" bits there are in X, when interpreted + as a quantity in MODE whose signedness is indicated by UNSIGNEDP. For + unsigned quantities, this is the number of high-order zero bits. + For signed quantities, this is the number of copies of the sign bit + minus 1. In both case, this function returns the number of "spare" + bits. For example, if two quantities for which this function returns + at least 1 are added, the addition is known not to overflow. + + This function will always return 0 unless called during combine, which + implies that it must be called from a define_split. */ + +unsigned int +extended_count (const_rtx x, enum machine_mode mode, int unsignedp) +{ + if (nonzero_sign_valid == 0) + return 0; + + return (unsignedp + ? (HWI_COMPUTABLE_MODE_P (mode) + ? (unsigned int) (GET_MODE_PRECISION (mode) - 1 + - floor_log2 (nonzero_bits (x, mode))) + : 0) + : num_sign_bit_copies (x, mode) - 1); +} + /* This function is called from `simplify_shift_const' to merge two outer operations. Specifically, we have already found that we need to perform operation *POP0 with constant *PCONST0 at the outermost Index: rtl.h =================================================================== --- rtl.h (revision 186039) +++ rtl.h (working copy) @@ -2455,6 +2455,7 @@ const_rtx, unsigned int); /* In combine.c */ +extern unsigned int extended_count (const_rtx, enum machine_mode, int); extern rtx remove_death (unsigned int, rtx); extern void dump_combine_stats (FILE *); extern void dump_combine_total_stats (FILE *);