From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 305 invoked by alias); 3 May 2010 09:39:32 -0000 Received: (qmail 32765 invoked by uid 22791); 3 May 2010 09:39:32 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00,SPF_FAIL X-Spam-Check-By: sourceware.org Received: from mx20.gnu.org (HELO mx20.gnu.org) (199.232.41.8) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 03 May 2010 09:39:27 +0000 Received: from mail.codesourcery.com ([38.113.113.100]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1O8s7Z-0000aS-Bx for gcc-patches@gcc.gnu.org; Mon, 03 May 2010 05:39:25 -0400 Received: (qmail 30975 invoked from network); 3 May 2010 09:39:21 -0000 Received: from unknown (HELO ?84.152.176.190?) (bernds@127.0.0.2) by mail.codesourcery.com with ESMTPA; 3 May 2010 09:39:21 -0000 Message-ID: <4BDE99BF.2030303@codesourcery.com> Date: Mon, 03 May 2010 09:39:00 -0000 From: Bernd Schmidt User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100425 Thunderbird/3.0.4 MIME-Version: 1.0 To: Eric Botcazou CC: gcc-patches@gcc.gnu.org, Paolo Bonzini , Andrew Pinski Subject: Re: Patch: PR40900, extending call patterns References: <4BDA2513.9000705@codesourcery.com> <4BDA9B5F.2040507@gnu.org> <4BDADDB4.9060904@codesourcery.com> <201005010054.17350.ebotcazou@adacore.com> In-Reply-To: <201005010054.17350.ebotcazou@adacore.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-detected-operating-system: by mx20.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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: 2010-05/txt/msg00115.txt.bz2 On 05/01/2010 12:54 AM, Eric Botcazou wrote: >> When finished, it looks like the one below. Simply setting >> sign_bit_copies in record_dead_and_set_regs_1 doesn't work, and rather >> than duplicating the bookkeeping I construct a small piece of RTL to >> pass to record_value_for_reg that makes it do the right thing. >> >> This works without modifying backends, but it has the drawback that it >> can't optimize indirect calls since we're lacking a decl for them. > > And going back to the Tree level in the RTL combiner is ugly. As Paolo mentioned, it's done elsewhere in combine already. If we put a decl in a SYMBOL_REF, we might as well use it. > Why can PowerPC > and MIPS already optimize this and not ARM? That's worth investigating. Seems to be because it's a signed operation, and arm has #define PROMOTE_MODE(MODE, UNSIGNEDP, TYPE) \ if (GET_MODE_CLASS (MODE) == MODE_INT \ && GET_MODE_SIZE (MODE) < 4) \ { \ if (MODE == QImode) \ UNSIGNEDP = 1; \ else if (MODE == HImode) \ UNSIGNEDP = 1; \ (MODE) = SImode; \ } while ppc doesn't modify UNSIGNEDP. Bernd