[cfe-dev] [Clang++] Error with handling casting operator to SIMD types
Eli Friedman
eli.friedman at gmail.com
Fri May 14 20:26:19 PDT 2010
On Fri, May 14, 2010 at 6:22 PM, Eric Christopher <echristo at apple.com> wrote:
>
> On May 14, 2010, at 4:57 PM, joel falcou wrote:
>
>> src/pipo.cpp:16:14: error: first two arguments to
>> __builtin_shufflevector must be vectors
>> __m128 y = _mm_shuffle_ps(x, x, 0);
>> ^~~~~~~~~~~~~~~~~~~~~~~
>> In file included from src/pipo.cpp:2:
>> /usr/local/lib/clang/2.0/include/xmmintrin.h:726:10: note: instantiated
>> from:
>> (__builtin_shufflevector(a, b, (mask) & 0x3, ((mask) & 0xc) >> 2, \
>> ^
>> 1 error generated.
>>
>> This error doesn't appear if we use _mm_add_ps or other intrinsics. Same
>> behavior for __m128i and __m128d
>
> For the record this is a problem within SemaBuiltinShuffleVector. I'm taking a look.
I think we actually need to introduce explicit casts into xmmintrin.h;
__builtin_shufflevector is a type-variant method, so it's impossible
to figure out the type of the shuffle if the inputs are classes.
-Eli
More information about the cfe-dev
mailing list