SPIR icon indicating copy to clipboard operation
SPIR copied to clipboard

xyzw and rgba selectors for vectors of 8 and 16 components

Open ex-rzr opened this issue 8 years ago • 1 comments

OpenCL C++ specification has this example:

int8 v8;
...
int3 v8c1 = v8.xyz; // ill-formed: xyzw and rgba selectors
                    // are not allowed on vector expressions
                    // with more than 4 components

"Table 2.5: Selector values and their corresponding components in swizzle" allows xyzw and rgba selectors only for vectors of 2, 3, 4 components.

Currently clang compiles this code without errors or warnings. Should it fail in this case?

ex-rzr avatar Feb 07 '17 10:02 ex-rzr

It may fail. I don't know if this is required.

bsochack avatar Feb 07 '17 18:02 bsochack