From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1480 invoked by alias); 13 Jul 2011 16:55:03 -0000 Received: (qmail 1464 invoked by uid 22791); 13 Jul 2011 16:55:02 -0000 X-SWARE-Spam-Status: No, hits=-2.3 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-ww0-f51.google.com (HELO mail-ww0-f51.google.com) (74.125.82.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 13 Jul 2011 16:54:48 +0000 Received: by wwj26 with SMTP id 26so5606421wwj.8 for ; Wed, 13 Jul 2011 09:54:47 -0700 (PDT) Received: by 10.227.39.66 with SMTP id f2mr1237096wbe.2.1310576086122; Wed, 13 Jul 2011 09:54:46 -0700 (PDT) MIME-Version: 1.0 Received: by 10.227.146.200 with HTTP; Wed, 13 Jul 2011 09:54:26 -0700 (PDT) In-Reply-To: References: <4E18C5BE.6020809@gnu.org> <4E1AD86A.8000800@gnu.org> <4E1DC42D.1010307@gnu.org> From: Paolo Bonzini Date: Wed, 13 Jul 2011 16:58:00 -0000 Message-ID: Subject: Re: PING: PATCH [4/n]: Prepare x32: Permute the conversion and addition if one operand is a constant To: "H.J. Lu" Cc: GCC Patches Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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/msg01069.txt.bz2 >>> Why? =A0Certainly Y =3D 8 has 31-bit (or less) precision. =A0So it has = the same >>> representation in SImode and DImode, and the test above on XEXP (x, 1) >>> succeeds. >> >> And then we permute conversion and addition, which leads to the issue you >> raised above. =A0In another word, the current code permutes conversion >> and addition. > > No, only if we have ptr_extend. Oops, hit send too early, I understand now what you mean. But even more so, let's make sure x32 is done right so that perhaps we can remove the bogus test on XEXP (x, 1) for other Pmode !=3D ptr_mode targets, non-ptr_extend. Then we can worry perhaps of POINTERS_EXTEND_UNSIGNED < 0. Paolo