From patchwork Tue Apr 30 14:56:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 240636 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 CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 2781C2C0098 for ; Wed, 1 May 2013 00:57:11 +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:from :to:subject:date:message-id:mime-version:content-type; q=dns; s= default; b=Sz5K+FbFk+RN8ebVfCmygvJl+wS6Nvb6eC1A+paRiFexQbTzWhdpJ pBaS+IhBmGCYRmvwo05nn+o6ahZnX14oPIkROcDC57W8Uc4MXySjlJPgZuyLxQvO ByBjEPl7TNSrl0CPL8qzVnQ75PtJV6jDZz0Sjc3oELjhaM3fYouH2A= 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:from :to:subject:date:message-id:mime-version:content-type; s= default; bh=3DjDqkMW1d91EvudgVQyWHgjguc=; b=OKnLSNPoa+hWhim9QRJf 7xsBqfBCQ96kXByjgbiNylUTTKs/bxfCFDAhoZY0nZlI2BYIvjAkmB1Ho9uHmN0I XSZbFJmhd1RhhRszxN6vTphXVgk58Tmg5Q5J9YNosyjl6Rooa0GFRyEq2bCN9QNS 5uUR6hBym5rQJu4WyQiIbfk= Received: (qmail 17534 invoked by alias); 30 Apr 2013 14:57:05 -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 17524 invoked by uid 89); 30 Apr 2013 14:57:05 -0000 X-Spam-SWARE-Status: No, score=-6.3 required=5.0 tests=BAYES_00, KHOP_RCVD_UNTRUST, RCVD_IN_DNSWL_MED, RCVD_IN_HOSTKARMA_W, RP_MATCHES_RCVD autolearn=ham version=3.3.1 Received: from e06smtp14.uk.ibm.com (HELO e06smtp14.uk.ibm.com) (195.75.94.110) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 30 Apr 2013 14:57:04 +0000 Received: from /spool/local by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 30 Apr 2013 15:51:36 +0100 Received: from d06dlp01.portsmouth.uk.ibm.com (9.149.20.13) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 30 Apr 2013 15:51:33 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id EF8EE17D801E for ; Tue, 30 Apr 2013 15:57:59 +0100 (BST) Received: from d06av01.portsmouth.uk.ibm.com (d06av01.portsmouth.uk.ibm.com [9.149.37.212]) by b06cxnps4075.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r3UEumIY40501294 for ; Tue, 30 Apr 2013 14:56:48 GMT Received: from d06av01.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r3UEuwtD007248 for ; Tue, 30 Apr 2013 08:56:58 -0600 Received: from sandifor-thinkpad.stglab.manchester.uk.ibm.com (sig-9-145-203-99.de.ibm.com [9.145.203.99]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id r3UEurgE007171 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Tue, 30 Apr 2013 08:56:56 -0600 From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, rsandifo@linux.vnet.ibm.com Subject: RFA: Use gen_int_mode in plus_constant Date: Tue, 30 Apr 2013 15:56:53 +0100 Message-ID: <87wqrk5aoa.fsf@sandifor-thinkpad.stglab.manchester.uk.ibm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 X-TM-AS-MML: No X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13043014-1948-0000-0000-00000503B355 This patch fixes out the GEN_INT/gen_int_mode that Richard pointed out in the wide-int review. It also passes "mode" rather than "VOIDmode" to immed_double_int_const. (As discussed in that thread, the latter change shouldn't make any difference in practice, but is still more correct in principle.) Bootstrapped & regression-tested on x86_64-linux-gnu. OK to install? Richard gcc/ * explow.c (plus_constant): Pass "mode" to immed_double_int_const. Use gen_int_mode rather than GEN_INT. Index: gcc/explow.c =================================================================== --- gcc/explow.c 2013-02-25 09:41:58.000000000 +0000 +++ gcc/explow.c 2013-04-30 15:52:57.270362112 +0100 @@ -106,10 +106,10 @@ plus_constant (enum machine_mode mode, r if (overflow) gcc_unreachable (); - return immed_double_int_const (v, VOIDmode); + return immed_double_int_const (v, mode); } - return GEN_INT (INTVAL (x) + c); + return gen_int_mode (INTVAL (x) + c, mode); case CONST_DOUBLE: { @@ -124,7 +124,7 @@ plus_constant (enum machine_mode mode, r To fix, add constant support wider than CONST_DOUBLE. */ gcc_assert (GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_DOUBLE_INT); - return immed_double_int_const (v, VOIDmode); + return immed_double_int_const (v, mode); } case MEM: