This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Vector shuffling


On Sun, Aug 15, 2010 at 6:07 PM, Chris Lattner <clattner@apple.com> wrote:
>
> On Aug 15, 2010, at 7:30 AM, Artem Shinkarov wrote:
>
>> The patch implements vector shuffling according to the OpenCL
>> standard. The patch introduces builtin function __builtin_shuffle
>> which accepts two or three parameters: __builtin_shuffle (vec, mask)
>> or __builtin_shuffle (vec0, vec1, mask) and returns a shuffled vector.
>>
>> Function is trying to dispatch shuffling to the hardware-specific
>> shuffling instructions via new target hooks. If this attempt fails,
>> function expands shuffling piecewise.
>
> Great, thanks for working on this. ?In the effort to make free software compilers agree with each other in this case, could you consider implementing the same extension that Clang provides?
> http://clang.llvm.org/docs/LanguageExtensions.html#__builtin_shufflevector
>
> The major difference is the naming of the builtin and that the index list is taken as a series of variadic arguments.

It seems to me that the focus should first be on implementing the
standard, and only look at extensions later. But perhaps you can file
an enhancement request in Bugzilla when the patch is on the GCC trunk.

Ciao!
Steven


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]