From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1250 invoked by alias); 22 Aug 2010 06:46:09 -0000 Received: (qmail 1242 invoked by uid 22791); 22 Aug 2010 06:46:08 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.35) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 22 Aug 2010 06:46:02 +0000 Received: from kpbe16.cbf.corp.google.com (kpbe16.cbf.corp.google.com [172.25.105.80]) by smtp-out.google.com with ESMTP id o7M6jw9L017912 for ; Sat, 21 Aug 2010 23:45:59 -0700 Received: from vws18 (vws18.prod.google.com [10.241.21.146]) by kpbe16.cbf.corp.google.com with ESMTP id o7M6jv2M030132 for ; Sat, 21 Aug 2010 23:45:57 -0700 Received: by vws18 with SMTP id 18so3032316vws.15 for ; Sat, 21 Aug 2010 23:45:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.85.145 with SMTP id o17mr2223925vcl.51.1282459556942; Sat, 21 Aug 2010 23:45:56 -0700 (PDT) Received: by 10.220.198.193 with HTTP; Sat, 21 Aug 2010 23:45:56 -0700 (PDT) In-Reply-To: <4C6D7F0C.3090209@redhat.com> References: <87eiduu7pq.fsf@basil.nowhere.org> <4C6D77E0.6020609@redhat.com> <4C6D7F0C.3090209@redhat.com> Date: Sun, 22 Aug 2010 09:46:00 -0000 Message-ID: Subject: Re: define MMX/SSE intrinsics without requiring cmdline isa flags From: Xinliang David Li To: Richard Henderson Cc: "H.J. Lu" , Andi Kleen , GCC Patches Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-IsSubscribed: yes 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: 2010-08/txt/msg01693.txt.bz2 On Thu, Aug 19, 2010 at 11:59 AM, Richard Henderson wrote: > On 08/19/2010 11:52 AM, Xinliang David Li wrote: >> On Thu, Aug 19, 2010 at 11:28 AM, Richard Henderson wro= te: >>> On 08/19/2010 10:48 AM, H.J. Lu wrote: >>>> 2. Should we always define vector modes even when SSE isn't enabled? >>> >>> No, or at least not without further changes. =A0They will be defined >>> as generic vectors with BLKmode instead of target-specific vectors >>> with a vector mode. >>> >> >> What are the main changes required? > > I don't know. =A0Some way to make the definition of a vector type > identical with and without true vector support, while retaining > both the generic expansion of vector ops in tree-vect-generic.c > and the current calling conventions for generic vectors without > SSE/MMX support. Vector lowering pass in the current does depend on 1) whether the vector type's mode is a vector mode or not and 2) whether the vector mode can be handled by the optab handler of the associated opcode. The optab handler is reinitialized (depending on the hardware support specified by target options) for each routine when it is being processed. It seems to me the logic can be simplified to use 2). It also seems that when making a vector type node, the most efficient vector mode will be picked by the layout function anyway -- the actual mode of the type depends on the current function's target options (e.g underlying hw support). This mechanism seems ok. There might be some bugs associated with it -- compiling the attached source with -mno-sse -O2 -m64 results in a compiler ICE. However, the proposed change to make isa builtins and their wrapper intriniscs' definitions available by default to users are independent of handling of vector modes. Thanks, David > > r~ >