This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Allow % to work on vectors
- From: Ian Lance Taylor <iant at google dot com>
- To: Andrew Pinski <Andrew_Pinski at playstation dot sony dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 19 May 2009 17:31:37 -0700
- Subject: Re: [PATCH] Allow % to work on vectors
- References: <de8d50360904171148m147385e0k722b6eeae1e672f3@mail.gmail.com> <de8d50360904201132h7d736c46me9d0f5f9647fdf53@mail.gmail.com> <de8d50360905051156p282e87f7s7f19e959fbb2f1bd@mail.gmail.com>
Andrew Pinski <Andrew_Pinski@playstation.sony.com> writes:
> Ping on the C++ part of the patch.
> On Mon, Apr 20, 2009 at 11:32 AM, Andrew Pinski
> <Andrew_Pinski@playstation.sony.com> wrote:
>> Woops forgot the patch.
>>
>> On Fri, Apr 17, 2009 at 11:48 AM, Andrew Pinski
>> <Andrew_Pinski@playstation.sony.com> wrote:
>>> Hi,
>>> ÂThis patch allows for % (remainder) to work on integer vectors.
>>> This does not add any patterns that optimize % to just division with a
>>> subtraction of vector types though, that will be for a seperate patch.
>>>
>>> OK? Bootstrapped and tested on i686-linux-gnu with no regressions.
>>>
>>> Thanks,
>>> Andrew Pinski
>>>
>>> ChangeLog:
>>> * c-typeck.c (build_binary_op): Allow % on integal vectors.
>>> * doc/extend.texi (Vector Extension): Document that % is allowed too.
>>>
>>> cp/ChangeLog:
>>> * typeck.c (build_binary_op): Allow % on integal vectors.
>>>
>>> testsuite/ChangeLog:
>>> * gcc.dg/vector-4.c: New testcase.
>>> * gcc.dg/simd-1b.c: % is now allowed for integer vectors.
>>> * g++.dg/ext/vector16.C: New testcase.
This is OK.
Thanks.
Ian