From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26527 invoked by alias); 2 Feb 2004 23:37:50 -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 26512 invoked from network); 2 Feb 2004 23:37:49 -0000 Received: from unknown (HELO mail-out4.apple.com) (17.254.13.23) by sources.redhat.com with SMTP; 2 Feb 2004 23:37:49 -0000 Received: from mailgate2.apple.com (a17-128-100-204.apple.com [17.128.100.204]) by mail-out4.apple.com (8.12.10/8.12.11) with ESMTP id i12NbmX3007484 for ; Mon, 2 Feb 2004 15:37:48 -0800 (PST) Received: from relay2.apple.com (relay2.apple.com) by mailgate2.apple.com (Content Technologies SMTPRS 4.3.6) with ESMTP id ; Mon, 2 Feb 2004 15:37:48 -0800 Received: from apple.com (mrs1.apple.com [17.201.24.248]) by relay2.apple.com (8.12.9/8.12.11) with ESMTP id i12NbGt9022225; Mon, 2 Feb 2004 23:37:17 GMT Date: Mon, 02 Feb 2004 23:37:00 -0000 Subject: Re: Help restricting args of an intrinsic function Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v552) Cc: Diego Novillo , Syd Polk , GCC List To: Joe Buck From: Mike Stump In-Reply-To: <20040202152606.B7898@synopsys.com> Message-Id: Content-Transfer-Encoding: 7bit X-SW-Source: 2004-02/txt/msg00134.txt.bz2 On Monday, February 2, 2004, at 03:26 PM, Joe Buck wrote: > On Fri, Jan 30, 2004 at 07:59:34PM -0800, Mike Stump wrote: >> On Friday, January 30, 2004, at 05:38 PM, Diego Novillo wrote: >>> Yes, that's fine. Here's what tree-ssa emits after the tree >>> optimization passes for the test cases you mentioned. >> >> So, does your scheme work when the optimizer is off (-O0)? >> >> If not, why would that be a solution? > > Who says that exactly one instruction must be emitted with the > optimizer > off? It seems to me that it would suffice to have the builtin function > emit the one instruction in the case where the mask arguments, after > any > optimization, are constant, and otherwise emit whatever code is needed > to > compute the correct result (or simply emit a call to a library > function). This violates the users expectations. The _point_ of having builtins for single machine instructions is so that the generated code will use them (or something better). Tweaking a builtin to generate an external lib call or 5 instructions instead of using that one machine instruction isn't, uhm, winning. The one case were it would be winning, is if you wanted to use x86 builtins on the ppc and the compiler did its best to make it just work.