From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8004 invoked by alias); 9 Jun 2010 22:01:38 -0000 Received: (qmail 7910 invoked by uid 22791); 9 Jun 2010 22:01:37 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (212.99.106.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 09 Jun 2010 22:01:31 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 4841ECB0258; Thu, 10 Jun 2010 00:01:34 +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 A0nA52JMn2aF; Thu, 10 Jun 2010 00:01:34 +0200 (CEST) Received: from [192.168.1.2] (91-165-0-22.rev.libertysurf.net [91.165.0.22]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id 1E8D3CB016C; Thu, 10 Jun 2010 00:01:33 +0200 (CEST) From: Eric Botcazou To: Bernd Schmidt Subject: Re: Patch: PR40900, extending call patterns Date: Wed, 09 Jun 2010 22:14:00 -0000 User-Agent: KMail/1.9.9 Cc: gcc-patches@gcc.gnu.org, Paolo Bonzini , Andrew Pinski References: <4BDA2513.9000705@codesourcery.com> <201005051458.39945.ebotcazou@adacore.com> <4C0EB9A5.6080907@codesourcery.com> In-Reply-To: <4C0EB9A5.6080907@codesourcery.com> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <201006092357.53844.ebotcazou@adacore.com> Content-Type: text/plain; charset="iso-8859-1" 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: 2010-06/txt/msg01011.txt.bz2 > I've looked into this now, and I don't really see a way to do better at > rtl expansion time. IIRC I did manage to get your testcase optimized with only a few changed lines in expr.c. I can try again, but not before the end of the week. > In current sources, the function ends up as > D.2006_1 = shortv2 (); [tail call] > return D.2006_1; > > PROMOTE_MODE ensures that D.2006_1 becomes > #0 store_expr (exp=0xf7cbb5e8, target=0xf7d2c5ac, call_param_p=0, > nontemporal=0 '\000') at ../../trunk/gcc/expr.c:4582 > 4582 rtx inner_target = 0; > (gdb) p target(gdb) p debug_rtx (target) > (subreg/s/u:HI (reg:SI 133 [ D.2006 ]) 0) The root of the problem, this unsigned extension must never be generated or the game is indeed over. Instead of a signed one should, by switching to PROMOTE_FUNCTION_MODE in this particular case (lhs of a call). -- Eric Botcazou