From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19202 invoked by alias); 16 Jun 2009 22:45:32 -0000 Received: (qmail 19193 invoked by uid 22791); 16 Jun 2009 22:45:31 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_41 X-Spam-Check-By: sourceware.org Received: from mail3.caviumnetworks.com (HELO mail3.caviumnetworks.com) (12.108.191.235) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 16 Jun 2009 22:45:20 +0000 Received: from caexch01.caveonetworks.com (Not Verified[192.168.16.9]) by mail3.caviumnetworks.com with MailMarshal (v6,2,2,3503) id ; Tue, 16 Jun 2009 18:45:13 -0400 Received: from caexch01.caveonetworks.com ([192.168.16.9]) by caexch01.caveonetworks.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 16 Jun 2009 15:44:47 -0700 Received: from localhost ([64.169.86.201]) by caexch01.caveonetworks.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Tue, 16 Jun 2009 15:44:47 -0700 From: Adam Nemet MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19000.8283.533096.76324@ropi.home> Date: Tue, 16 Jun 2009 22:45:00 -0000 To: Ian Lance Taylor Cc: gcc@gcc.gnu.org, law@redhat.com Subject: Re: Rationale for an old TRUNCATE patch In-Reply-To: References: Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2009-06/txt/msg00382.txt.bz2 Ian Lance Taylor writes: > I agree that this patch looks wrong in todays compiler. There should be > no need to call TRULY_NOOP_TRUNCATION if you are in a TRUNCATE anyhow. Thanks. Do you think we can assume this for TRUNCATEs in general or only for MIPS-like TRUNCATEs? I can't think of why it would be useful to represent a mode so that bits outside the mode mask don't either depent on bits inside the mask or are don't-care bits. IOW, can we assume that for any TRUNCATE from wider mode W to narrower mode N the following holds: (truncate:N expr:W) == (truncate:N (and:W expr:W GET_MODE_MASK(Nmode))) ? Where == is not necessarily identical bit representation of the object holding the value (e.g. QI HI values in MIPS) but that they are indistinguishable in the operations that are defined on them. Adam