-
Notifications
You must be signed in to change notification settings - Fork 50
Description
File test/libclcxx/pipes/TestBasicPipeStructData.cl (OpenCL 2.2 C++) from libclcxx tests contains a structure which contains a long long member. If you compile that file as describled in the readme there are no errors. If later you translate binary .spir file to text SPIR-V .spt file (using llvm-spirv or spirv-dis), it turns out that there is a TypeInt <id> 128 0 SPIR-V instruction, which defines a 128-bit integer.
That means that not only OpenCL C++ compiler accepted long long type, which is not defined in OpenCL C++ spec (however, long long is a reserved for future use), but also compiled it to 128-bit integer (I would somehow understand if it compiles long long to 64-bit integer`).
// in .cl file:
struct structType
{
float a;
int b;
long long c;
};
// in .spt file:
4 TypeInt <ID> 128 0Is it correct behaviour? Because I would expect a compilation error.