From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1183 invoked by alias); 29 Jul 2011 06:34:54 -0000 Received: (qmail 1032 invoked by uid 22791); 29 Jul 2011 06:34:53 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-yx0-f175.google.com (HELO mail-yx0-f175.google.com) (209.85.213.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 29 Jul 2011 06:34:39 +0000 Received: by yxi19 with SMTP id 19so2366222yxi.20 for ; Thu, 28 Jul 2011 23:34:38 -0700 (PDT) Received: by 10.101.158.19 with SMTP id k19mr684248ano.61.1311921276620; Thu, 28 Jul 2011 23:34:36 -0700 (PDT) Received: from yakj.usersys.redhat.com (93-34-199-31.ip51.fastwebnet.it [93.34.199.31]) by mx.google.com with ESMTPS id j20sm1534580anb.26.2011.07.28.23.34.33 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 28 Jul 2011 23:34:34 -0700 (PDT) Message-ID: <4E325477.60705@gnu.org> Date: Fri, 29 Jul 2011 09:32:00 -0000 From: Paolo Bonzini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110707 Thunderbird/5.0 MIME-Version: 1.0 To: "H.J. Lu" CC: Uros Bizjak , gcc-patches@gcc.gnu.org Subject: Re: PING: PATCH [4/n]: Prepare x32: Permute the conversion and addition if one operand is a constant References: <4E312C6A.8040301@gnu.org> In-Reply-To: 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: 2011-07/txt/msg02635.txt.bz2 Ok, you removed ignore_address_wrap_around, so we're almost there. On 07/28/2011 07:59 PM, H.J. Lu wrote: > @@ -712,7 +715,16 @@ convert_modes (enum machine_mode mode, enum machine_mode oldmode, rtx x, int uns > if (GET_CODE (x) == SUBREG&& SUBREG_PROMOTED_VAR_P (x) > && GET_MODE_SIZE (GET_MODE (SUBREG_REG (x)))>= GET_MODE_SIZE (mode) > && SUBREG_PROMOTED_UNSIGNED_P (x) == unsignedp) > - x = gen_lowpart (mode, x); > + { > + temp = rtl_hooks.gen_lowpart_no_emit (mode, x); > + if (temp) > + x = temp; > + else > + { > + gcc_assert (!no_emit); > + x = gen_lowpart (mode, x); > + } > + } + { + /* gen_lowpart_no_emit should always succeed here. */ + x = rtl_hooks.gen_lowpart_no_emit (mode, x); + } > > if (GET_MODE (x) != VOIDmode) > oldmode = GET_MODE (x); > @@ -776,6 +788,10 @@ convert_modes (enum machine_mode mode, enum machine_mode oldmode, rtx x, int uns > return gen_int_mode (val, mode); > } > > + temp = rtl_hooks.gen_lowpart_no_emit (mode, x); > + if (temp) > + return temp; > + gcc_assert (!no_emit); > return gen_lowpart (mode, x); Right now, gen_lowpart_no_emit will never return NULL, so these tests in convert_modes are dead. Instead, please include in your patch mine at http://permalink.gmane.org/gmane.comp.gcc.patches/242085 and adjust as follows. + temp = rtl_hooks.gen_lowpart_no_emit (mode, x); + if (no_emit) + return rtl_hooks.gen_lowpart_no_emit (mode, x); + else + return gen_lowpart (mode, x); > } If it does not work, PLEASE say why instead of posting another "updated patch". Paolo