From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21833 invoked by alias); 2 Aug 2007 16:56:38 -0000 Received: (qmail 21823 invoked by uid 22791); 2 Aug 2007 16:56:37 -0000 X-Spam-Check-By: sourceware.org Received: from nf-out-0910.google.com (HELO nf-out-0910.google.com) (64.233.182.189) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 02 Aug 2007 16:56:28 +0000 Received: by nf-out-0910.google.com with SMTP id h3so158241nfh for ; Thu, 02 Aug 2007 09:56:26 -0700 (PDT) Received: by 10.86.100.7 with SMTP id x7mr1509351fgb.1186073786035; Thu, 02 Aug 2007 09:56:26 -0700 (PDT) Received: from scientist.local ( [213.140.22.65]) by mx.google.com with ESMTPS id 22sm4371064fkr.2007.08.02.09.56.20 (version=SSLv3 cipher=RC4-MD5); Thu, 02 Aug 2007 09:56:20 -0700 (PDT) Message-ID: <46B20CB2.7000103@gnu.org> Date: Thu, 02 Aug 2007 16:56:00 -0000 From: Paolo Bonzini User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Andreas Krebbel CC: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] lower-subreg: Decompose multiword shifts References: <20070802153434.GA24953@blc4eb430604175.ibm.com> In-Reply-To: <20070802153434.GA24953@blc4eb430604175.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 2007-08/txt/msg00135.txt.bz2 > Besides the fact that a shift decomposed into 2 simple move > instructions can often be merged into other INSNs also the rest of > lower subreg benefits since more multiword regs can be marked as > decomposable. Great! You could investigate changing the code so that the condition becomes + if (INTVAL (shift_count) < BITS_PER_WORD + || GET_MODE_BITSIZE (GET_MODE (shift_operand)) != 2 * BITS_PER_WORD) + return 0; (your code has != in the first branch). You can turn the code into a move+a shift, which simplifies to two moves if INTVAL (shift_count) == BITS_PER_WORD, in this case. Paolo