From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1444 invoked by alias); 29 Jan 2002 13:07:04 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 1385 invoked from network); 29 Jan 2002 13:06:53 -0000 Received: from unknown (HELO fw-cam.cambridge.arm.com) (193.131.176.3) by sources.redhat.com with SMTP; 29 Jan 2002 13:06:53 -0000 Received: by fw-cam.cambridge.arm.com; id NAA16777; Tue, 29 Jan 2002 13:06:52 GMT Received: from unknown(172.16.1.2) by fw-cam.cambridge.arm.com via smap (V5.5) id xma016183; Tue, 29 Jan 02 13:06:13 GMT Received: from cam-mail2.cambridge.arm.com (localhost [127.0.0.1]) by cam-admin0.cambridge.arm.com (8.9.3/8.9.3) with ESMTP id NAA13603; Tue, 29 Jan 2002 13:06:12 GMT Received: from sun18.cambridge.arm.com (sun18.cambridge.arm.com [172.16.2.18]) by cam-mail2.cambridge.arm.com (8.9.3/8.9.3) with ESMTP id NAA13099; Tue, 29 Jan 2002 13:06:10 GMT Message-Id: <200201291306.NAA13099@cam-mail2.cambridge.arm.com> X-Mailer: exmh version 2.0.2 2/24/98 To: law@redhat.com cc: kenner@vlsi1.ultra.nyu.edu (Richard Kenner), gcc@gcc.gnu.org, Richard.Earnshaw@arm.com Reply-To: Richard.Earnshaw@arm.com Organization: ARM Ltd. X-Telephone: +44 1223 400569 (direct+voicemail), +44 1223 400400 (switchbd) X-Fax: +44 1223 400410 X-Address: ARM Ltd., 110 Fulbourn Road, Cherry Hinton, Cambridge CB1 9NJ. X-Url: http://www.arm.com/ Subject: Re: paradoxical subreg problem In-reply-to: Your message of "Mon, 28 Jan 2002 14:00:50 MST." <17379.1012251650@porcupine.cygnus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 29 Jan 2002 10:31:00 -0000 From: Richard Earnshaw X-SW-Source: 2002-01/txt/msg01876.txt.bz2 > In message <10201281935.AA25716@vlsi1.ultra.nyu.edu>, Richard Kenner writes: > > Don't assume you can break it into two expressions. Consider the > > expression as it stands (and as combine creates it). > > > > Sure, but I'm trying to define what it means by comparison with > > two expressions. > > > > So with your assertions in mind are these two expresions equivalent? > > > > (and:SI (subreg:SI (mem:QI) 0) (const_int 255)) > > > > (subreg:SI (mem:QI X) 0) > > Are you sure? > > Are the bits outside the mode of SUBREG_REG undefined or "don't care"? That > is the crux of the issue. > > If those bits are undefined, then those expressions are not equivalent as > the result of the first expression has 24 zeros in its high bits whereas > the second expression has 24 undefined bits. If those bits are "don't care" > then the compiler can treat those expressions as equivalent. > I was under the impression that we would only create paradoxical subregs of a mem if LOAD_EXTEND_OP returns either ZERO_EXTEND or SIGN_EXTEND for the mode of the mem (ie, we won't create such paradoxical subregs if LOAD_EXTEND_OP returns NIL). That is, the operation is an alternate way of expressing the extend operation, because that is what will happen in practice. Given the above, then on such machines (subreg:SI (mem:QI X) 0) is defined for all 32 bits. R.