From patchwork Mon May 19 11:40:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Schmidt X-Patchwork-Id: 350213 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 C413514008D for ; Mon, 19 May 2014 21:40:35 +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 :message-id:date:from:mime-version:to:subject:content-type; q= dns; s=default; b=HMrvtzYVQRMVzu8GFQVNxkCovHGPCr/g+/rmGOXWdvMnFz +kpmrqr8I2FfjhBl0lGaR+XHLMIeuV2VQBs97lCSpZjNVYdVQ8UUNBv+ArlLigWI YE78KBLEiFHA/BdWQSV1OsW9PY3FJYQs1SD+I7jWILODqZzBjSZ67Lw1BbKVk= 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 :message-id:date:from:mime-version:to:subject:content-type; s= default; bh=NhZBJMCYYjE7j5K4zV8/qK8qmoI=; b=g4QBK3dbSO5y6XsWV4EX u2Nk1JV2wGR28IqU0v31q+SFemQU7FYvx/3Jh9L+VnbzrfHoP04uuixTpPcwd9bE KG/P2UWWu3vvNOGaUe3xcN29Ft+nYZshmk/tmBRl0rylqevVF+SfHtaejkAJ4XgA S1quwjc5dTvHMGRskoiU+v4= Received: (qmail 21880 invoked by alias); 19 May 2014 11:40:28 -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 21862 invoked by uid 89); 19 May 2014 11:40:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, FROM_12LTRDOM autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 19 May 2014 11:40:25 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1WmLvY-000073-Oj from Bernd_Schmidt@mentor.com for gcc-patches@gcc.gnu.org; Mon, 19 May 2014 04:40:20 -0700 Received: from SVR-IES-FEM-03.mgc.mentorg.com ([137.202.0.108]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Mon, 19 May 2014 04:40:20 -0700 Received: from [127.0.0.1] (137.202.0.76) by SVR-IES-FEM-03.mgc.mentorg.com (137.202.0.108) with Microsoft SMTP Server id 14.2.247.3; Mon, 19 May 2014 12:40:18 +0100 Message-ID: <5379EDA0.6040206@codesourcery.com> Date: Mon, 19 May 2014 13:40:16 +0200 From: Bernd Schmidt User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: GCC Patches Subject: Fix an error in a change from 2009 There was a patch to change GET_CODE(..) == CONST_INT to CONST_INT_P, and in one instance this was done incorrectly, leaving only a plain GET_CODE without any comparison. I've committed the following as obvious after testing on x86_64-linux. Bernd * simplify-rtx.c (simplify_unary_operation_1): Use CONST_INT_P in shift simplification where it was intended. diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 04af01e..bdbcc6b 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -867,7 +867,7 @@ simplify_unary_operation_1 (enum rtx_code code, enum machine_mode mode, rtx op) so we can perform the above simplification. */ if (STORE_FLAG_VALUE == -1 && GET_CODE (op) == ASHIFTRT - && GET_CODE (XEXP (op, 1)) + && CONST_INT_P (XEXP (op, 1)) && INTVAL (XEXP (op, 1)) == GET_MODE_PRECISION (mode) - 1) return simplify_gen_relational (GE, mode, VOIDmode, XEXP (op, 0), const0_rtx);