This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Vector comparison
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Artem Shinkarov <artyom dot shinkaroff at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Richard Guenther <richard dot guenther at gmail dot com>
- Date: Sun, 15 Aug 2010 18:45:41 +0000 (UTC)
- Subject: Re: Vector comparison
- References: <AANLkTimDve4hPRY9NEHprfa9SDjUGRykgEM=mdDFKNQf@mail.gmail.com>
On Sun, 15 Aug 2010, Artem Shinkarov wrote:
> This patch implements vector comparison according to OpenCL standard.
Suppose your target's vector comparison instructions encode the result
some way other than a vector of 0 and -1 values. How effectively can such
instructions be used in the context of your patch? In the typical use
cases of comparisons that you expect in real code, will it be possible to
optimize code written for the 0 and -1 values so that it uses instructions
generating some other encoding without a lot of conversions between the
two conventions? (For example, if code does several vector comparisons
and boolean operations on the results of those comparisons, it should be
possible to convert convention at most once at the end of those
operations.) Is there a clear route, once your patch is applied, to add
support incrementally for targets using such other conventions and for
such optimizations for such targets?
--
Joseph S. Myers
joseph@codesourcery.com