From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1819 invoked by alias); 19 Aug 2005 23:08:34 -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 1807 invoked by uid 22791); 19 Aug 2005 23:08:31 -0000 Received: from yosemite.airs.com (HELO yosemite.airs.com) (205.217.158.180) by sourceware.org (qpsmtpd/0.30-dev) with SMTP; Fri, 19 Aug 2005 23:08:31 +0000 Received: (qmail 23074 invoked by uid 10); 19 Aug 2005 23:08:29 -0000 Received: (qmail 13705 invoked by uid 500); 19 Aug 2005 23:08:23 -0000 To: fjahanian@apple.com Cc: Dale Johannesen , gcc mailing list Subject: Re: Fwd: [RFC] - Regression exposed by recent change to compress_float_constant References: <263482fcfbcc31184df9e901a9811db9@apple.com> From: Ian Lance Taylor Date: Fri, 19 Aug 2005 23:08:00 -0000 In-Reply-To: <263482fcfbcc31184df9e901a9811db9@apple.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2005-08/txt/msg00542.txt.bz2 On Aug 10, 2005, at 12:43 PM, Fariborz Jahanian wrote: > + /* APPLE LOCAL begin radar 4153339 */ > + if (n_sets == 1 && GET_CODE (sets[i].src) == REG > + && src_const && GET_CODE (src_const) == CONST_DOUBLE) > + { > + src_folded = src_const; > + src_folded_cost = src_folded_regcost = -1; > + } > + /* APPLE LOCAL end radar 4153339 */ I don't see how this could be right for FSF gcc. It's putting a target specific decision into the target independent code. It is simply not true that a constant double is always cheaper than a register, for example. The similar case you cite, of the indirect jump insn, really is target independent--a branch to a known destination is always going to be cheaper than an indirect branch via a register. It seems possible that this could be fixed by adjusting the cost of the CONST_DOUBLE in the target backend. Ian