brintos

brintos / llvm-project-archived public Read only

0
0
Text · 574 B · 86c1a9e Raw
16 lines · c
1// RUN: %clang_cc1 -triple spirv-pc-vulkan-compute -Wno-unused-value -verify=valid %s -o -2// RUN: %clang_cc1 -triple spirv32 -verify=invalid -Wno-unused-value %s -cl-std=CL3.0 -x cl -o -3// RUN: %clang_cc1 -triple spirv64 -verify=invalid -Wno-unused-value %s -cl-std=CL3.0 -x cl -o -4 5typedef float float2 __attribute__((ext_vector_type(2)));6 7// valid-no-diagnostics8 9void call(float2 X, float2 Y) {10  __builtin_spirv_reflect(X, Y);11  // invalid-error@-1 {{builtin requires spirv target}}12}13 14// no error15float valid_builtin(float2 X) { return __builtin_spirv_length(X); }16