diff --git a/libclc/libspirv/include/libspirv/lp64_types.h b/libclc/libspirv/include/libspirv/lp64_types.h index aa8e9ad85be63..e9b7095fb8b5e 100644 --- a/libclc/libspirv/include/libspirv/lp64_types.h +++ b/libclc/libspirv/include/libspirv/lp64_types.h @@ -22,6 +22,13 @@ typedef char __clc_vec4_char_t __attribute__((ext_vector_type(4))); typedef char __clc_vec8_char_t __attribute__((ext_vector_type(8))); typedef char __clc_vec16_char_t __attribute__((ext_vector_type(16))); +typedef signed char __clc_schar_t; +typedef signed char __clc_vec2_schar_t __attribute__((ext_vector_type(2))); +typedef signed char __clc_vec3_schar_t __attribute__((ext_vector_type(3))); +typedef signed char __clc_vec4_schar_t __attribute__((ext_vector_type(4))); +typedef signed char __clc_vec8_schar_t __attribute__((ext_vector_type(8))); +typedef signed char __clc_vec16_schar_t __attribute__((ext_vector_type(16))); + typedef char __clc_int8_t; typedef char __clc_vec2_int8_t __attribute__((ext_vector_type(2))); typedef char __clc_vec3_int8_t __attribute__((ext_vector_type(3))); diff --git a/libclc/test/binding/core/ConvertFToS_Rschar.cl b/libclc/test/binding/core/ConvertFToS_Rschar.cl new file mode 100644 index 0000000000000..436909aa4564e --- /dev/null +++ b/libclc/test/binding/core/ConvertFToS_Rschar.cl @@ -0,0 +1,33 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s + +#include + +// CHECK-NOT: declare {{.*}} @_Z +// CHECK-NOT: call {{[^ ]*}} bitcast +__attribute__((overloadable)) __clc_schar_t +test___spirv_ConvertFToS_Rschar(__clc_fp32_t args_0) { + return __spirv_ConvertFToS_Rschar(args_0); +} + +#ifdef cl_khr_fp64 +__attribute__((overloadable)) __clc_schar_t +test___spirv_ConvertFToS_Rschar(__clc_fp64_t args_0) { + return __spirv_ConvertFToS_Rschar(args_0); +} + +#endif +#ifdef cl_khr_fp16 +__attribute__((overloadable)) __clc_schar_t +test___spirv_ConvertFToS_Rschar(__clc_fp16_t args_0) { + return __spirv_ConvertFToS_Rschar(args_0); +} + +#endif diff --git a/libclc/test/binding/core/ConvertFToS_Rschar2.cl b/libclc/test/binding/core/ConvertFToS_Rschar2.cl new file mode 100644 index 0000000000000..3f1d68eefaa5c --- /dev/null +++ b/libclc/test/binding/core/ConvertFToS_Rschar2.cl @@ -0,0 +1,33 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s + +#include + +// CHECK-NOT: declare {{.*}} @_Z +// CHECK-NOT: call {{[^ ]*}} bitcast +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_ConvertFToS_Rschar2(__clc_vec2_fp32_t args_0) { + return __spirv_ConvertFToS_Rschar2(args_0); +} + +#ifdef cl_khr_fp64 +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_ConvertFToS_Rschar2(__clc_vec2_fp64_t args_0) { + return __spirv_ConvertFToS_Rschar2(args_0); +} + +#endif +#ifdef cl_khr_fp16 +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_ConvertFToS_Rschar2(__clc_vec2_fp16_t args_0) { + return __spirv_ConvertFToS_Rschar2(args_0); +} + +#endif diff --git a/libclc/test/binding/core/ConvertFToS_Rschar2_rte.cl b/libclc/test/binding/core/ConvertFToS_Rschar2_rte.cl new file mode 100644 index 0000000000000..12745f98f863f --- /dev/null +++ b/libclc/test/binding/core/ConvertFToS_Rschar2_rte.cl @@ -0,0 +1,33 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s + +#include + +// CHECK-NOT: declare {{.*}} @_Z +// CHECK-NOT: call {{[^ ]*}} bitcast +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_ConvertFToS_Rschar2_rte(__clc_vec2_fp32_t args_0) { + return __spirv_ConvertFToS_Rschar2_rte(args_0); +} + +#ifdef cl_khr_fp64 +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_ConvertFToS_Rschar2_rte(__clc_vec2_fp64_t args_0) { + return __spirv_ConvertFToS_Rschar2_rte(args_0); +} + +#endif +#ifdef cl_khr_fp16 +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_ConvertFToS_Rschar2_rte(__clc_vec2_fp16_t args_0) { + return __spirv_ConvertFToS_Rschar2_rte(args_0); +} + +#endif diff --git a/libclc/test/binding/core/ConvertFToS_Rschar2_rtn.cl b/libclc/test/binding/core/ConvertFToS_Rschar2_rtn.cl new file mode 100644 index 0000000000000..980f1d89b53cf --- /dev/null +++ b/libclc/test/binding/core/ConvertFToS_Rschar2_rtn.cl @@ -0,0 +1,33 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s + +#include + +// CHECK-NOT: declare {{.*}} @_Z +// CHECK-NOT: call {{[^ ]*}} bitcast +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_ConvertFToS_Rschar2_rtn(__clc_vec2_fp32_t args_0) { + return __spirv_ConvertFToS_Rschar2_rtn(args_0); +} + +#ifdef cl_khr_fp64 +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_ConvertFToS_Rschar2_rtn(__clc_vec2_fp64_t args_0) { + return __spirv_ConvertFToS_Rschar2_rtn(args_0); +} + +#endif +#ifdef cl_khr_fp16 +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_ConvertFToS_Rschar2_rtn(__clc_vec2_fp16_t args_0) { + return __spirv_ConvertFToS_Rschar2_rtn(args_0); +} + +#endif diff --git a/libclc/test/binding/core/ConvertFToS_Rschar2_rtp.cl b/libclc/test/binding/core/ConvertFToS_Rschar2_rtp.cl new file mode 100644 index 0000000000000..9f41f5886947a --- /dev/null +++ b/libclc/test/binding/core/ConvertFToS_Rschar2_rtp.cl @@ -0,0 +1,33 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s + +#include + +// CHECK-NOT: declare {{.*}} @_Z +// CHECK-NOT: call {{[^ ]*}} bitcast +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_ConvertFToS_Rschar2_rtp(__clc_vec2_fp32_t args_0) { + return __spirv_ConvertFToS_Rschar2_rtp(args_0); +} + +#ifdef cl_khr_fp64 +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_ConvertFToS_Rschar2_rtp(__clc_vec2_fp64_t args_0) { + return __spirv_ConvertFToS_Rschar2_rtp(args_0); +} + +#endif +#ifdef cl_khr_fp16 +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_ConvertFToS_Rschar2_rtp(__clc_vec2_fp16_t args_0) { + return __spirv_ConvertFToS_Rschar2_rtp(args_0); +} + +#endif diff --git a/libclc/test/binding/core/ConvertFToS_Rschar2_rtz.cl b/libclc/test/binding/core/ConvertFToS_Rschar2_rtz.cl new file mode 100644 index 0000000000000..a4e8d9bece33c --- /dev/null +++ b/libclc/test/binding/core/ConvertFToS_Rschar2_rtz.cl @@ -0,0 +1,33 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s + +#include + +// CHECK-NOT: declare {{.*}} @_Z +// CHECK-NOT: call {{[^ ]*}} bitcast +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_ConvertFToS_Rschar2_rtz(__clc_vec2_fp32_t args_0) { + return __spirv_ConvertFToS_Rschar2_rtz(args_0); +} + +#ifdef cl_khr_fp64 +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_ConvertFToS_Rschar2_rtz(__clc_vec2_fp64_t args_0) { + return __spirv_ConvertFToS_Rschar2_rtz(args_0); +} + +#endif +#ifdef cl_khr_fp16 +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_ConvertFToS_Rschar2_rtz(__clc_vec2_fp16_t args_0) { + return __spirv_ConvertFToS_Rschar2_rtz(args_0); +} + +#endif diff --git a/libclc/test/binding/core/ConvertFToS_Rschar2_sat.cl b/libclc/test/binding/core/ConvertFToS_Rschar2_sat.cl new file mode 100644 index 0000000000000..b0a6598dfa51b --- /dev/null +++ b/libclc/test/binding/core/ConvertFToS_Rschar2_sat.cl @@ -0,0 +1,33 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s + +#include + +// CHECK-NOT: declare {{.*}} @_Z +// CHECK-NOT: call {{[^ ]*}} bitcast +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_ConvertFToS_Rschar2_sat(__clc_vec2_fp32_t args_0) { + return __spirv_ConvertFToS_Rschar2_sat(args_0); +} + +#ifdef cl_khr_fp64 +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_ConvertFToS_Rschar2_sat(__clc_vec2_fp64_t args_0) { + return __spirv_ConvertFToS_Rschar2_sat(args_0); +} + +#endif +#ifdef cl_khr_fp16 +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_ConvertFToS_Rschar2_sat(__clc_vec2_fp16_t args_0) { + return __spirv_ConvertFToS_Rschar2_sat(args_0); +} + +#endif diff --git a/libclc/test/binding/core/ConvertFToS_Rschar2_sat_rte.cl b/libclc/test/binding/core/ConvertFToS_Rschar2_sat_rte.cl new file mode 100644 index 0000000000000..eb4affaedea87 --- /dev/null +++ b/libclc/test/binding/core/ConvertFToS_Rschar2_sat_rte.cl @@ -0,0 +1,33 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s + +#include + +// CHECK-NOT: declare {{.*}} @_Z +// CHECK-NOT: call {{[^ ]*}} bitcast +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_ConvertFToS_Rschar2_sat_rte(__clc_vec2_fp32_t args_0) { + return __spirv_ConvertFToS_Rschar2_sat_rte(args_0); +} + +#ifdef cl_khr_fp64 +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_ConvertFToS_Rschar2_sat_rte(__clc_vec2_fp64_t args_0) { + return __spirv_ConvertFToS_Rschar2_sat_rte(args_0); +} + +#endif +#ifdef cl_khr_fp16 +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_ConvertFToS_Rschar2_sat_rte(__clc_vec2_fp16_t args_0) { + return __spirv_ConvertFToS_Rschar2_sat_rte(args_0); +} + +#endif diff --git a/libclc/test/binding/core/ConvertFToS_Rschar2_sat_rtn.cl b/libclc/test/binding/core/ConvertFToS_Rschar2_sat_rtn.cl new file mode 100644 index 0000000000000..c9215f6210790 --- /dev/null +++ b/libclc/test/binding/core/ConvertFToS_Rschar2_sat_rtn.cl @@ -0,0 +1,33 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s + +#include + +// CHECK-NOT: declare {{.*}} @_Z +// CHECK-NOT: call {{[^ ]*}} bitcast +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_ConvertFToS_Rschar2_sat_rtn(__clc_vec2_fp32_t args_0) { + return __spirv_ConvertFToS_Rschar2_sat_rtn(args_0); +} + +#ifdef cl_khr_fp64 +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_ConvertFToS_Rschar2_sat_rtn(__clc_vec2_fp64_t args_0) { + return __spirv_ConvertFToS_Rschar2_sat_rtn(args_0); +} + +#endif +#ifdef cl_khr_fp16 +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_ConvertFToS_Rschar2_sat_rtn(__clc_vec2_fp16_t args_0) { + return __spirv_ConvertFToS_Rschar2_sat_rtn(args_0); +} + +#endif diff --git a/libclc/test/binding/core/ConvertFToS_Rschar2_sat_rtp.cl b/libclc/test/binding/core/ConvertFToS_Rschar2_sat_rtp.cl new file mode 100644 index 0000000000000..fb22e0df12b5d --- /dev/null +++ b/libclc/test/binding/core/ConvertFToS_Rschar2_sat_rtp.cl @@ -0,0 +1,33 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s + +#include + +// CHECK-NOT: declare {{.*}} @_Z +// CHECK-NOT: call {{[^ ]*}} bitcast +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_ConvertFToS_Rschar2_sat_rtp(__clc_vec2_fp32_t args_0) { + return __spirv_ConvertFToS_Rschar2_sat_rtp(args_0); +} + +#ifdef cl_khr_fp64 +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_ConvertFToS_Rschar2_sat_rtp(__clc_vec2_fp64_t args_0) { + return __spirv_ConvertFToS_Rschar2_sat_rtp(args_0); +} + +#endif +#ifdef cl_khr_fp16 +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_ConvertFToS_Rschar2_sat_rtp(__clc_vec2_fp16_t args_0) { + return __spirv_ConvertFToS_Rschar2_sat_rtp(args_0); +} + +#endif diff --git a/libclc/test/binding/core/ConvertFToS_Rschar2_sat_rtz.cl b/libclc/test/binding/core/ConvertFToS_Rschar2_sat_rtz.cl new file mode 100644 index 0000000000000..8107cda9f00ca --- /dev/null +++ b/libclc/test/binding/core/ConvertFToS_Rschar2_sat_rtz.cl @@ -0,0 +1,33 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s + +#include + +// CHECK-NOT: declare {{.*}} @_Z +// CHECK-NOT: call {{[^ ]*}} bitcast +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_ConvertFToS_Rschar2_sat_rtz(__clc_vec2_fp32_t args_0) { + return __spirv_ConvertFToS_Rschar2_sat_rtz(args_0); +} + +#ifdef cl_khr_fp64 +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_ConvertFToS_Rschar2_sat_rtz(__clc_vec2_fp64_t args_0) { + return __spirv_ConvertFToS_Rschar2_sat_rtz(args_0); +} + +#endif +#ifdef cl_khr_fp16 +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_ConvertFToS_Rschar2_sat_rtz(__clc_vec2_fp16_t args_0) { + return __spirv_ConvertFToS_Rschar2_sat_rtz(args_0); +} + +#endif diff --git a/libclc/test/binding/core/ConvertFToS_Rschar_rte.cl b/libclc/test/binding/core/ConvertFToS_Rschar_rte.cl new file mode 100644 index 0000000000000..796a8b1b14b91 --- /dev/null +++ b/libclc/test/binding/core/ConvertFToS_Rschar_rte.cl @@ -0,0 +1,33 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s + +#include + +// CHECK-NOT: declare {{.*}} @_Z +// CHECK-NOT: call {{[^ ]*}} bitcast +__attribute__((overloadable)) __clc_schar_t +test___spirv_ConvertFToS_Rschar_rte(__clc_fp32_t args_0) { + return __spirv_ConvertFToS_Rschar_rte(args_0); +} + +#ifdef cl_khr_fp64 +__attribute__((overloadable)) __clc_schar_t +test___spirv_ConvertFToS_Rschar_rte(__clc_fp64_t args_0) { + return __spirv_ConvertFToS_Rschar_rte(args_0); +} + +#endif +#ifdef cl_khr_fp16 +__attribute__((overloadable)) __clc_schar_t +test___spirv_ConvertFToS_Rschar_rte(__clc_fp16_t args_0) { + return __spirv_ConvertFToS_Rschar_rte(args_0); +} + +#endif diff --git a/libclc/test/binding/core/ConvertFToS_Rschar_rtn.cl b/libclc/test/binding/core/ConvertFToS_Rschar_rtn.cl new file mode 100644 index 0000000000000..9ba22e2a4478a --- /dev/null +++ b/libclc/test/binding/core/ConvertFToS_Rschar_rtn.cl @@ -0,0 +1,33 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s + +#include + +// CHECK-NOT: declare {{.*}} @_Z +// CHECK-NOT: call {{[^ ]*}} bitcast +__attribute__((overloadable)) __clc_schar_t +test___spirv_ConvertFToS_Rschar_rtn(__clc_fp32_t args_0) { + return __spirv_ConvertFToS_Rschar_rtn(args_0); +} + +#ifdef cl_khr_fp64 +__attribute__((overloadable)) __clc_schar_t +test___spirv_ConvertFToS_Rschar_rtn(__clc_fp64_t args_0) { + return __spirv_ConvertFToS_Rschar_rtn(args_0); +} + +#endif +#ifdef cl_khr_fp16 +__attribute__((overloadable)) __clc_schar_t +test___spirv_ConvertFToS_Rschar_rtn(__clc_fp16_t args_0) { + return __spirv_ConvertFToS_Rschar_rtn(args_0); +} + +#endif diff --git a/libclc/test/binding/core/ConvertFToS_Rschar_rtp.cl b/libclc/test/binding/core/ConvertFToS_Rschar_rtp.cl new file mode 100644 index 0000000000000..3311c6cff59c8 --- /dev/null +++ b/libclc/test/binding/core/ConvertFToS_Rschar_rtp.cl @@ -0,0 +1,33 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s + +#include + +// CHECK-NOT: declare {{.*}} @_Z +// CHECK-NOT: call {{[^ ]*}} bitcast +__attribute__((overloadable)) __clc_schar_t +test___spirv_ConvertFToS_Rschar_rtp(__clc_fp32_t args_0) { + return __spirv_ConvertFToS_Rschar_rtp(args_0); +} + +#ifdef cl_khr_fp64 +__attribute__((overloadable)) __clc_schar_t +test___spirv_ConvertFToS_Rschar_rtp(__clc_fp64_t args_0) { + return __spirv_ConvertFToS_Rschar_rtp(args_0); +} + +#endif +#ifdef cl_khr_fp16 +__attribute__((overloadable)) __clc_schar_t +test___spirv_ConvertFToS_Rschar_rtp(__clc_fp16_t args_0) { + return __spirv_ConvertFToS_Rschar_rtp(args_0); +} + +#endif diff --git a/libclc/test/binding/core/ConvertFToS_Rschar_rtz.cl b/libclc/test/binding/core/ConvertFToS_Rschar_rtz.cl new file mode 100644 index 0000000000000..53825f0fda0c7 --- /dev/null +++ b/libclc/test/binding/core/ConvertFToS_Rschar_rtz.cl @@ -0,0 +1,33 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s + +#include + +// CHECK-NOT: declare {{.*}} @_Z +// CHECK-NOT: call {{[^ ]*}} bitcast +__attribute__((overloadable)) __clc_schar_t +test___spirv_ConvertFToS_Rschar_rtz(__clc_fp32_t args_0) { + return __spirv_ConvertFToS_Rschar_rtz(args_0); +} + +#ifdef cl_khr_fp64 +__attribute__((overloadable)) __clc_schar_t +test___spirv_ConvertFToS_Rschar_rtz(__clc_fp64_t args_0) { + return __spirv_ConvertFToS_Rschar_rtz(args_0); +} + +#endif +#ifdef cl_khr_fp16 +__attribute__((overloadable)) __clc_schar_t +test___spirv_ConvertFToS_Rschar_rtz(__clc_fp16_t args_0) { + return __spirv_ConvertFToS_Rschar_rtz(args_0); +} + +#endif diff --git a/libclc/test/binding/core/ConvertFToS_Rschar_sat.cl b/libclc/test/binding/core/ConvertFToS_Rschar_sat.cl new file mode 100644 index 0000000000000..b6cf3ae31adc0 --- /dev/null +++ b/libclc/test/binding/core/ConvertFToS_Rschar_sat.cl @@ -0,0 +1,33 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s + +#include + +// CHECK-NOT: declare {{.*}} @_Z +// CHECK-NOT: call {{[^ ]*}} bitcast +__attribute__((overloadable)) __clc_schar_t +test___spirv_ConvertFToS_Rschar_sat(__clc_fp32_t args_0) { + return __spirv_ConvertFToS_Rschar_sat(args_0); +} + +#ifdef cl_khr_fp64 +__attribute__((overloadable)) __clc_schar_t +test___spirv_ConvertFToS_Rschar_sat(__clc_fp64_t args_0) { + return __spirv_ConvertFToS_Rschar_sat(args_0); +} + +#endif +#ifdef cl_khr_fp16 +__attribute__((overloadable)) __clc_schar_t +test___spirv_ConvertFToS_Rschar_sat(__clc_fp16_t args_0) { + return __spirv_ConvertFToS_Rschar_sat(args_0); +} + +#endif diff --git a/libclc/test/binding/core/ConvertFToS_Rschar_sat_rte.cl b/libclc/test/binding/core/ConvertFToS_Rschar_sat_rte.cl new file mode 100644 index 0000000000000..38b15c449d020 --- /dev/null +++ b/libclc/test/binding/core/ConvertFToS_Rschar_sat_rte.cl @@ -0,0 +1,33 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s + +#include + +// CHECK-NOT: declare {{.*}} @_Z +// CHECK-NOT: call {{[^ ]*}} bitcast +__attribute__((overloadable)) __clc_schar_t +test___spirv_ConvertFToS_Rschar_sat_rte(__clc_fp32_t args_0) { + return __spirv_ConvertFToS_Rschar_sat_rte(args_0); +} + +#ifdef cl_khr_fp64 +__attribute__((overloadable)) __clc_schar_t +test___spirv_ConvertFToS_Rschar_sat_rte(__clc_fp64_t args_0) { + return __spirv_ConvertFToS_Rschar_sat_rte(args_0); +} + +#endif +#ifdef cl_khr_fp16 +__attribute__((overloadable)) __clc_schar_t +test___spirv_ConvertFToS_Rschar_sat_rte(__clc_fp16_t args_0) { + return __spirv_ConvertFToS_Rschar_sat_rte(args_0); +} + +#endif diff --git a/libclc/test/binding/core/ConvertFToS_Rschar_sat_rtn.cl b/libclc/test/binding/core/ConvertFToS_Rschar_sat_rtn.cl new file mode 100644 index 0000000000000..75f275b558e31 --- /dev/null +++ b/libclc/test/binding/core/ConvertFToS_Rschar_sat_rtn.cl @@ -0,0 +1,33 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s + +#include + +// CHECK-NOT: declare {{.*}} @_Z +// CHECK-NOT: call {{[^ ]*}} bitcast +__attribute__((overloadable)) __clc_schar_t +test___spirv_ConvertFToS_Rschar_sat_rtn(__clc_fp32_t args_0) { + return __spirv_ConvertFToS_Rschar_sat_rtn(args_0); +} + +#ifdef cl_khr_fp64 +__attribute__((overloadable)) __clc_schar_t +test___spirv_ConvertFToS_Rschar_sat_rtn(__clc_fp64_t args_0) { + return __spirv_ConvertFToS_Rschar_sat_rtn(args_0); +} + +#endif +#ifdef cl_khr_fp16 +__attribute__((overloadable)) __clc_schar_t +test___spirv_ConvertFToS_Rschar_sat_rtn(__clc_fp16_t args_0) { + return __spirv_ConvertFToS_Rschar_sat_rtn(args_0); +} + +#endif diff --git a/libclc/test/binding/core/ConvertFToS_Rschar_sat_rtp.cl b/libclc/test/binding/core/ConvertFToS_Rschar_sat_rtp.cl new file mode 100644 index 0000000000000..275d7bb4d4acb --- /dev/null +++ b/libclc/test/binding/core/ConvertFToS_Rschar_sat_rtp.cl @@ -0,0 +1,33 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s + +#include + +// CHECK-NOT: declare {{.*}} @_Z +// CHECK-NOT: call {{[^ ]*}} bitcast +__attribute__((overloadable)) __clc_schar_t +test___spirv_ConvertFToS_Rschar_sat_rtp(__clc_fp32_t args_0) { + return __spirv_ConvertFToS_Rschar_sat_rtp(args_0); +} + +#ifdef cl_khr_fp64 +__attribute__((overloadable)) __clc_schar_t +test___spirv_ConvertFToS_Rschar_sat_rtp(__clc_fp64_t args_0) { + return __spirv_ConvertFToS_Rschar_sat_rtp(args_0); +} + +#endif +#ifdef cl_khr_fp16 +__attribute__((overloadable)) __clc_schar_t +test___spirv_ConvertFToS_Rschar_sat_rtp(__clc_fp16_t args_0) { + return __spirv_ConvertFToS_Rschar_sat_rtp(args_0); +} + +#endif diff --git a/libclc/test/binding/core/ConvertFToS_Rschar_sat_rtz.cl b/libclc/test/binding/core/ConvertFToS_Rschar_sat_rtz.cl new file mode 100644 index 0000000000000..44525d6b062ef --- /dev/null +++ b/libclc/test/binding/core/ConvertFToS_Rschar_sat_rtz.cl @@ -0,0 +1,33 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s + +#include + +// CHECK-NOT: declare {{.*}} @_Z +// CHECK-NOT: call {{[^ ]*}} bitcast +__attribute__((overloadable)) __clc_schar_t +test___spirv_ConvertFToS_Rschar_sat_rtz(__clc_fp32_t args_0) { + return __spirv_ConvertFToS_Rschar_sat_rtz(args_0); +} + +#ifdef cl_khr_fp64 +__attribute__((overloadable)) __clc_schar_t +test___spirv_ConvertFToS_Rschar_sat_rtz(__clc_fp64_t args_0) { + return __spirv_ConvertFToS_Rschar_sat_rtz(args_0); +} + +#endif +#ifdef cl_khr_fp16 +__attribute__((overloadable)) __clc_schar_t +test___spirv_ConvertFToS_Rschar_sat_rtz(__clc_fp16_t args_0) { + return __spirv_ConvertFToS_Rschar_sat_rtz(args_0); +} + +#endif diff --git a/libclc/test/binding/core/SConvert_Rschar.cl b/libclc/test/binding/core/SConvert_Rschar.cl new file mode 100644 index 0000000000000..b136b0607a91d --- /dev/null +++ b/libclc/test/binding/core/SConvert_Rschar.cl @@ -0,0 +1,28 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s + +#include + +// CHECK-NOT: declare {{.*}} @_Z +// CHECK-NOT: call {{[^ ]*}} bitcast +__attribute__((overloadable)) __clc_schar_t +test___spirv_SConvert_Rschar(__clc_int16_t args_0) { + return __spirv_SConvert_Rschar(args_0); +} + +__attribute__((overloadable)) __clc_schar_t +test___spirv_SConvert_Rschar(__clc_int32_t args_0) { + return __spirv_SConvert_Rschar(args_0); +} + +__attribute__((overloadable)) __clc_schar_t +test___spirv_SConvert_Rschar(__clc_int64_t args_0) { + return __spirv_SConvert_Rschar(args_0); +} diff --git a/libclc/test/binding/core/SConvert_Rschar2.cl b/libclc/test/binding/core/SConvert_Rschar2.cl new file mode 100644 index 0000000000000..40688655e9058 --- /dev/null +++ b/libclc/test/binding/core/SConvert_Rschar2.cl @@ -0,0 +1,28 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s + +#include + +// CHECK-NOT: declare {{.*}} @_Z +// CHECK-NOT: call {{[^ ]*}} bitcast +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_SConvert_Rschar2(__clc_vec2_int16_t args_0) { + return __spirv_SConvert_Rschar2(args_0); +} + +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_SConvert_Rschar2(__clc_vec2_int32_t args_0) { + return __spirv_SConvert_Rschar2(args_0); +} + +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_SConvert_Rschar2(__clc_vec2_int64_t args_0) { + return __spirv_SConvert_Rschar2(args_0); +} diff --git a/libclc/test/binding/core/SConvert_Rschar2_sat.cl b/libclc/test/binding/core/SConvert_Rschar2_sat.cl new file mode 100644 index 0000000000000..ad6c4ff842aaf --- /dev/null +++ b/libclc/test/binding/core/SConvert_Rschar2_sat.cl @@ -0,0 +1,28 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s + +#include + +// CHECK-NOT: declare {{.*}} @_Z +// CHECK-NOT: call {{[^ ]*}} bitcast +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_SConvert_Rschar2_sat(__clc_vec2_int16_t args_0) { + return __spirv_SConvert_Rschar2_sat(args_0); +} + +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_SConvert_Rschar2_sat(__clc_vec2_int32_t args_0) { + return __spirv_SConvert_Rschar2_sat(args_0); +} + +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_SConvert_Rschar2_sat(__clc_vec2_int64_t args_0) { + return __spirv_SConvert_Rschar2_sat(args_0); +} diff --git a/libclc/test/binding/core/SConvert_Rschar_sat.cl b/libclc/test/binding/core/SConvert_Rschar_sat.cl new file mode 100644 index 0000000000000..2e1a7a9e5704c --- /dev/null +++ b/libclc/test/binding/core/SConvert_Rschar_sat.cl @@ -0,0 +1,28 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s + +#include + +// CHECK-NOT: declare {{.*}} @_Z +// CHECK-NOT: call {{[^ ]*}} bitcast +__attribute__((overloadable)) __clc_schar_t +test___spirv_SConvert_Rschar_sat(__clc_int16_t args_0) { + return __spirv_SConvert_Rschar_sat(args_0); +} + +__attribute__((overloadable)) __clc_schar_t +test___spirv_SConvert_Rschar_sat(__clc_int32_t args_0) { + return __spirv_SConvert_Rschar_sat(args_0); +} + +__attribute__((overloadable)) __clc_schar_t +test___spirv_SConvert_Rschar_sat(__clc_int64_t args_0) { + return __spirv_SConvert_Rschar_sat(args_0); +} diff --git a/libclc/test/binding/core/SatConvertUToS_Rschar.cl b/libclc/test/binding/core/SatConvertUToS_Rschar.cl new file mode 100644 index 0000000000000..f81dda196c0eb --- /dev/null +++ b/libclc/test/binding/core/SatConvertUToS_Rschar.cl @@ -0,0 +1,33 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s + +#include + +// CHECK-NOT: declare {{.*}} @_Z +// CHECK-NOT: call {{[^ ]*}} bitcast +__attribute__((overloadable)) __clc_schar_t +test___spirv_SatConvertUToS_Rschar(__clc_uint8_t args_0) { + return __spirv_SatConvertUToS_Rschar(args_0); +} + +__attribute__((overloadable)) __clc_schar_t +test___spirv_SatConvertUToS_Rschar(__clc_uint16_t args_0) { + return __spirv_SatConvertUToS_Rschar(args_0); +} + +__attribute__((overloadable)) __clc_schar_t +test___spirv_SatConvertUToS_Rschar(__clc_uint32_t args_0) { + return __spirv_SatConvertUToS_Rschar(args_0); +} + +__attribute__((overloadable)) __clc_schar_t +test___spirv_SatConvertUToS_Rschar(__clc_uint64_t args_0) { + return __spirv_SatConvertUToS_Rschar(args_0); +} diff --git a/libclc/test/binding/core/SatConvertUToS_Rschar2.cl b/libclc/test/binding/core/SatConvertUToS_Rschar2.cl new file mode 100644 index 0000000000000..035a99080ace2 --- /dev/null +++ b/libclc/test/binding/core/SatConvertUToS_Rschar2.cl @@ -0,0 +1,33 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s + +#include + +// CHECK-NOT: declare {{.*}} @_Z +// CHECK-NOT: call {{[^ ]*}} bitcast +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_SatConvertUToS_Rschar2(__clc_vec2_uint8_t args_0) { + return __spirv_SatConvertUToS_Rschar2(args_0); +} + +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_SatConvertUToS_Rschar2(__clc_vec2_uint16_t args_0) { + return __spirv_SatConvertUToS_Rschar2(args_0); +} + +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_SatConvertUToS_Rschar2(__clc_vec2_uint32_t args_0) { + return __spirv_SatConvertUToS_Rschar2(args_0); +} + +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_SatConvertUToS_Rschar2(__clc_vec2_uint64_t args_0) { + return __spirv_SatConvertUToS_Rschar2(args_0); +}