This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Add comparison operators for vector types
On Sat, May 30, 2009 at 6:17 AM, Chris Lattner <email@example.com> wrote:
> On May 29, 2009, at 6:06 PM, Andrew Pinski wrote:
>> ?The C/C++ Language extension for the Cell defines the comparison
>> operators for vectors. ?The result of these operators is a single
>> boolean value representing the bitwise AND of all pairwise
>> comparisons. ?This patch adds support for these operators and a
>> testcase to test them for both C and C++.
>> This patch was originally written by Trevor and updated by me for the
>> tuplifications of tree-vect-generic.c.
>> OK? Bootstrapped and tested on i686-linux-gnu with no regressions.
> Is this something you want to do on the Cell alone, or for generic vectors
> in general? ?Note that OpenCL defines vector comparisons differently than
> this. ?If GCC aims to support it one day, it would useful to consider what
> it wants. ?Cell is a particularly useful target for OpenCL.
It is also a change from what tree.def defines for EQ_EXPR and NE_EXPR.
You should at least update the docs there. Please also update the
gimple (type) checker to check that the result of vector comparisons is
of vector type (which would also catch old uses of EQ/NE_EXPR with
the other suggested semantic).