On Aug 31, 2011, at 1:27 AM, Artem Shinkarov wrote:

>> If you're going to add vector shuffling builtins, you might consider adding 
>> the same builtin that clang has for compatibility:
>> http://clang.llvm.org/docs/LanguageExtensions.html#__builtin_shufflevector
>> 
>> It should be straight-forward to map it into the same IR.
>> 
>> -Chris
>> 
> 
> Chris
> 
> I am trying to use OpenCL syntax here which says that the mask for
> shuffling is a vector. Also I didn't really get from the clang
> description if the indexes could be non-constnants? If not, then I
> have a problem here, because I want to support this.

Yes, constant elements are required for this builtin.  It is an implementation 
detail, but Clang doesn't implement the OpenCL shuffle operations with builtins.

-Chris

Reply via email to