From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3812 invoked by alias); 7 Oct 2012 12:36:42 -0000 Received: (qmail 3800 invoked by uid 22791); 7 Oct 2012 12:36:41 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 07 Oct 2012 12:36:34 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id B02B629002C; Sun, 7 Oct 2012 14:36:43 +0200 (CEST) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bEWunktolxga; Sun, 7 Oct 2012 14:36:43 +0200 (CEST) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id 05A6D29000A; Sun, 7 Oct 2012 14:36:42 +0200 (CEST) From: Eric Botcazou To: Richard Sandiford Cc: gcc-patches@gcc.gnu.org, Andrew Pinski , Uros Bizjak , Paul_Koning@dell.com, kkojima@gcc.gnu.org, aoliva@redhat.com, dje.gcc@gmail.com, uweigand@de.ibm.com, walt@tilera.com Subject: Re: RFA: Simplifying truncation and integer lowpart subregs Date: Sun, 07 Oct 2012 12:36:00 -0000 Message-ID: <5155263.MbS9aEve2E@polaris> User-Agent: KMail/4.7.2 (Linux/3.1.10-1.16-desktop; KDE/4.7.2; x86_64; ; ) In-Reply-To: <874nm6oe2n.fsf@talisman.home> References: <7298988.0gvUXNUO8B@polaris> <874nm6oe2n.fsf@talisman.home> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2012-10/txt/msg00668.txt.bz2 > Yeah, in hindsight, the patch was definitely lacking commentary. > How about the patch below? It also fixes the partial int case > and gets rid of the errant NOT hunk. Tested in the same way as before. > > Richard > > > gcc/ > * machmode.h (GET_MODE_UNIT_PRECISION): New macro. > * simplify-rtx.c (simplify_truncation): New function, > extracted from simplify_subreg and (in small part) from > simplify_unary_operation_1. > (simplify_unary_operation_1) : Use it. Remove sign bit > test for !TRULY_NOOP_TRUNCATION_MODES_P. > (simplify_subreg): Use simplify_truncate for lowpart subregs > where both the inner and outer modes are scalar integers. This looks good to me, thanks. -- Eric Botcazou