From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6540 invoked by alias); 15 Aug 2010 17:31:02 -0000 Received: (qmail 6525 invoked by uid 22791); 15 Aug 2010 17:31:01 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mail-vw0-f47.google.com (HELO mail-vw0-f47.google.com) (209.85.212.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 15 Aug 2010 17:30:55 +0000 Received: by vws13 with SMTP id 13so2816511vws.20 for ; Sun, 15 Aug 2010 10:30:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.168.12 with SMTP id s12mr2490773vcy.240.1281893451895; Sun, 15 Aug 2010 10:30:51 -0700 (PDT) Received: by 10.220.178.77 with HTTP; Sun, 15 Aug 2010 10:30:51 -0700 (PDT) In-Reply-To: References: Date: Sun, 15 Aug 2010 17:34:00 -0000 Message-ID: Subject: Re: Vector comparison From: Andrew Pinski To: Artem Shinkarov Cc: gcc-patches@gcc.gnu.org, Richard Guenther Content-Type: text/plain; charset=UTF-8 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/msg01108.txt.bz2 On Sun, Aug 15, 2010 at 10:09 AM, Artem Shinkarov wrote: > This patch implements vector comparison according to OpenCL standard. > The patch tries to dispatch vector comparison to hardware-specific > instructions. If case when it is impossible, vector comparison is > expanded piecewise. I had posted a patch which had implemented them using the standard tree codes and expansion and tree-lower-vect took care of the rest. This was for reduction of vector comparison into a single scalar. In fact we had agreed that they should implicitly turn a vector int into a scalar when used in the context of a bool. See http://gcc.gnu.org/ml/gcc-patches/2009-05/msg01912.html . Please consider using tree codes all the way through the gimple IR if the target supports expansion and doing the expansion only at expand time. Building a call expression is expensive and really you could use opcodes and not worry about a target hook. I think opcodes it is a much easier way allowing for targets to add support rather than adding more and more target hooks. Thanks, Andrew Pinski