From c0de173a86aaffc56bd81896bab786ba59776366 Mon Sep 17 00:00:00 2001 From: Wenju He Date: Wed, 17 Dec 2025 04:42:49 +0100 Subject: [PATCH 1/2] [test][libspirv] Add manual tests for Rschar convert built-ins Prevents regressions when convert-Rschar symbols are accidentallly dropped. --- libclc/libspirv/include/libspirv/lp64_types.h | 7 ++++ .../test/binding/core/ConvertFToS_Rschar.cl | 33 +++++++++++++++++++ .../test/binding/core/ConvertFToS_Rschar2.cl | 33 +++++++++++++++++++ .../binding/core/ConvertFToS_Rschar2_rte.cl | 33 +++++++++++++++++++ .../binding/core/ConvertFToS_Rschar2_rtn.cl | 33 +++++++++++++++++++ .../binding/core/ConvertFToS_Rschar2_rtp.cl | 33 +++++++++++++++++++ .../binding/core/ConvertFToS_Rschar2_rtz.cl | 33 +++++++++++++++++++ .../binding/core/ConvertFToS_Rschar2_sat.cl | 33 +++++++++++++++++++ .../core/ConvertFToS_Rschar2_sat_rte.cl | 33 +++++++++++++++++++ .../core/ConvertFToS_Rschar2_sat_rtn.cl | 33 +++++++++++++++++++ .../core/ConvertFToS_Rschar2_sat_rtp.cl | 33 +++++++++++++++++++ .../core/ConvertFToS_Rschar2_sat_rtz.cl | 33 +++++++++++++++++++ .../binding/core/ConvertFToS_Rschar_rte.cl | 33 +++++++++++++++++++ .../binding/core/ConvertFToS_Rschar_rtn.cl | 33 +++++++++++++++++++ .../binding/core/ConvertFToS_Rschar_rtp.cl | 33 +++++++++++++++++++ .../binding/core/ConvertFToS_Rschar_rtz.cl | 33 +++++++++++++++++++ .../binding/core/ConvertFToS_Rschar_sat.cl | 33 +++++++++++++++++++ .../core/ConvertFToS_Rschar_sat_rte.cl | 33 +++++++++++++++++++ .../core/ConvertFToS_Rschar_sat_rtn.cl | 33 +++++++++++++++++++ .../core/ConvertFToS_Rschar_sat_rtp.cl | 33 +++++++++++++++++++ .../core/ConvertFToS_Rschar_sat_rtz.cl | 33 +++++++++++++++++++ libclc/test/binding/core/SConvert_Rschar.cl | 28 ++++++++++++++++ libclc/test/binding/core/SConvert_Rschar2.cl | 28 ++++++++++++++++ .../test/binding/core/SConvert_Rschar2_sat.cl | 28 ++++++++++++++++ .../test/binding/core/SConvert_Rschar_sat.cl | 28 ++++++++++++++++ .../binding/core/SatConvertUToS_Rschar.cl | 33 +++++++++++++++++++ .../binding/core/SatConvertUToS_Rschar2.cl | 33 +++++++++++++++++++ 27 files changed, 845 insertions(+) create mode 100644 libclc/test/binding/core/ConvertFToS_Rschar.cl create mode 100644 libclc/test/binding/core/ConvertFToS_Rschar2.cl create mode 100644 libclc/test/binding/core/ConvertFToS_Rschar2_rte.cl create mode 100644 libclc/test/binding/core/ConvertFToS_Rschar2_rtn.cl create mode 100644 libclc/test/binding/core/ConvertFToS_Rschar2_rtp.cl create mode 100644 libclc/test/binding/core/ConvertFToS_Rschar2_rtz.cl create mode 100644 libclc/test/binding/core/ConvertFToS_Rschar2_sat.cl create mode 100644 libclc/test/binding/core/ConvertFToS_Rschar2_sat_rte.cl create mode 100644 libclc/test/binding/core/ConvertFToS_Rschar2_sat_rtn.cl create mode 100644 libclc/test/binding/core/ConvertFToS_Rschar2_sat_rtp.cl create mode 100644 libclc/test/binding/core/ConvertFToS_Rschar2_sat_rtz.cl create mode 100644 libclc/test/binding/core/ConvertFToS_Rschar_rte.cl create mode 100644 libclc/test/binding/core/ConvertFToS_Rschar_rtn.cl create mode 100644 libclc/test/binding/core/ConvertFToS_Rschar_rtp.cl create mode 100644 libclc/test/binding/core/ConvertFToS_Rschar_rtz.cl create mode 100644 libclc/test/binding/core/ConvertFToS_Rschar_sat.cl create mode 100644 libclc/test/binding/core/ConvertFToS_Rschar_sat_rte.cl create mode 100644 libclc/test/binding/core/ConvertFToS_Rschar_sat_rtn.cl create mode 100644 libclc/test/binding/core/ConvertFToS_Rschar_sat_rtp.cl create mode 100644 libclc/test/binding/core/ConvertFToS_Rschar_sat_rtz.cl create mode 100644 libclc/test/binding/core/SConvert_Rschar.cl create mode 100644 libclc/test/binding/core/SConvert_Rschar2.cl create mode 100644 libclc/test/binding/core/SConvert_Rschar2_sat.cl create mode 100644 libclc/test/binding/core/SConvert_Rschar_sat.cl create mode 100644 libclc/test/binding/core/SatConvertUToS_Rschar.cl create mode 100644 libclc/test/binding/core/SatConvertUToS_Rschar2.cl 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..28cb83b2617ac --- /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..30b03aef779f6 --- /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..23c1cb22ddedf --- /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..41518385f4782 --- /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..3741686f36c42 --- /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..a76c1dfac631e --- /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..2b2a895e9516b --- /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..cab865e9e8e78 --- /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..3b17c21d577b0 --- /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..79508de38c95d --- /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..177b10b7f8454 --- /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); +} From f7ef3fe457b78e03790e96222da49085c8bb4a29 Mon Sep 17 00:00:00 2001 From: Wenju He Date: Wed, 17 Dec 2025 05:19:31 +0100 Subject: [PATCH 2/2] format using clangformat 20.1.8 --- libclc/test/binding/core/ConvertFToS_Rschar.cl | 8 ++++---- libclc/test/binding/core/ConvertFToS_Rschar2.cl | 8 ++++---- libclc/test/binding/core/ConvertFToS_Rschar_rte.cl | 8 ++++---- libclc/test/binding/core/ConvertFToS_Rschar_rtn.cl | 8 ++++---- libclc/test/binding/core/ConvertFToS_Rschar_rtp.cl | 8 ++++---- libclc/test/binding/core/ConvertFToS_Rschar_rtz.cl | 8 ++++---- libclc/test/binding/core/ConvertFToS_Rschar_sat.cl | 8 ++++---- libclc/test/binding/core/ConvertFToS_Rschar_sat_rte.cl | 8 ++++---- libclc/test/binding/core/ConvertFToS_Rschar_sat_rtn.cl | 8 ++++---- libclc/test/binding/core/ConvertFToS_Rschar_sat_rtp.cl | 8 ++++---- libclc/test/binding/core/ConvertFToS_Rschar_sat_rtz.cl | 8 ++++---- 11 files changed, 44 insertions(+), 44 deletions(-) diff --git a/libclc/test/binding/core/ConvertFToS_Rschar.cl b/libclc/test/binding/core/ConvertFToS_Rschar.cl index 28cb83b2617ac..436909aa4564e 100644 --- a/libclc/test/binding/core/ConvertFToS_Rschar.cl +++ b/libclc/test/binding/core/ConvertFToS_Rschar.cl @@ -18,15 +18,15 @@ test___spirv_ConvertFToS_Rschar(__clc_fp32_t args_0) { } #ifdef cl_khr_fp64 -__attribute__((overloadable)) -__clc_schar_t test___spirv_ConvertFToS_Rschar(__clc_fp64_t args_0) { +__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) { +__attribute__((overloadable)) __clc_schar_t +test___spirv_ConvertFToS_Rschar(__clc_fp16_t args_0) { return __spirv_ConvertFToS_Rschar(args_0); } diff --git a/libclc/test/binding/core/ConvertFToS_Rschar2.cl b/libclc/test/binding/core/ConvertFToS_Rschar2.cl index 30b03aef779f6..3f1d68eefaa5c 100644 --- a/libclc/test/binding/core/ConvertFToS_Rschar2.cl +++ b/libclc/test/binding/core/ConvertFToS_Rschar2.cl @@ -18,15 +18,15 @@ test___spirv_ConvertFToS_Rschar2(__clc_vec2_fp32_t args_0) { } #ifdef cl_khr_fp64 -__attribute__((overloadable)) -__clc_vec2_schar_t test___spirv_ConvertFToS_Rschar2(__clc_vec2_fp64_t args_0) { +__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) { +__attribute__((overloadable)) __clc_vec2_schar_t +test___spirv_ConvertFToS_Rschar2(__clc_vec2_fp16_t args_0) { return __spirv_ConvertFToS_Rschar2(args_0); } diff --git a/libclc/test/binding/core/ConvertFToS_Rschar_rte.cl b/libclc/test/binding/core/ConvertFToS_Rschar_rte.cl index 23c1cb22ddedf..796a8b1b14b91 100644 --- a/libclc/test/binding/core/ConvertFToS_Rschar_rte.cl +++ b/libclc/test/binding/core/ConvertFToS_Rschar_rte.cl @@ -18,15 +18,15 @@ test___spirv_ConvertFToS_Rschar_rte(__clc_fp32_t args_0) { } #ifdef cl_khr_fp64 -__attribute__((overloadable)) -__clc_schar_t test___spirv_ConvertFToS_Rschar_rte(__clc_fp64_t args_0) { +__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) { +__attribute__((overloadable)) __clc_schar_t +test___spirv_ConvertFToS_Rschar_rte(__clc_fp16_t args_0) { return __spirv_ConvertFToS_Rschar_rte(args_0); } diff --git a/libclc/test/binding/core/ConvertFToS_Rschar_rtn.cl b/libclc/test/binding/core/ConvertFToS_Rschar_rtn.cl index 41518385f4782..9ba22e2a4478a 100644 --- a/libclc/test/binding/core/ConvertFToS_Rschar_rtn.cl +++ b/libclc/test/binding/core/ConvertFToS_Rschar_rtn.cl @@ -18,15 +18,15 @@ test___spirv_ConvertFToS_Rschar_rtn(__clc_fp32_t args_0) { } #ifdef cl_khr_fp64 -__attribute__((overloadable)) -__clc_schar_t test___spirv_ConvertFToS_Rschar_rtn(__clc_fp64_t args_0) { +__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) { +__attribute__((overloadable)) __clc_schar_t +test___spirv_ConvertFToS_Rschar_rtn(__clc_fp16_t args_0) { return __spirv_ConvertFToS_Rschar_rtn(args_0); } diff --git a/libclc/test/binding/core/ConvertFToS_Rschar_rtp.cl b/libclc/test/binding/core/ConvertFToS_Rschar_rtp.cl index 3741686f36c42..3311c6cff59c8 100644 --- a/libclc/test/binding/core/ConvertFToS_Rschar_rtp.cl +++ b/libclc/test/binding/core/ConvertFToS_Rschar_rtp.cl @@ -18,15 +18,15 @@ test___spirv_ConvertFToS_Rschar_rtp(__clc_fp32_t args_0) { } #ifdef cl_khr_fp64 -__attribute__((overloadable)) -__clc_schar_t test___spirv_ConvertFToS_Rschar_rtp(__clc_fp64_t args_0) { +__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) { +__attribute__((overloadable)) __clc_schar_t +test___spirv_ConvertFToS_Rschar_rtp(__clc_fp16_t args_0) { return __spirv_ConvertFToS_Rschar_rtp(args_0); } diff --git a/libclc/test/binding/core/ConvertFToS_Rschar_rtz.cl b/libclc/test/binding/core/ConvertFToS_Rschar_rtz.cl index a76c1dfac631e..53825f0fda0c7 100644 --- a/libclc/test/binding/core/ConvertFToS_Rschar_rtz.cl +++ b/libclc/test/binding/core/ConvertFToS_Rschar_rtz.cl @@ -18,15 +18,15 @@ test___spirv_ConvertFToS_Rschar_rtz(__clc_fp32_t args_0) { } #ifdef cl_khr_fp64 -__attribute__((overloadable)) -__clc_schar_t test___spirv_ConvertFToS_Rschar_rtz(__clc_fp64_t args_0) { +__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) { +__attribute__((overloadable)) __clc_schar_t +test___spirv_ConvertFToS_Rschar_rtz(__clc_fp16_t args_0) { return __spirv_ConvertFToS_Rschar_rtz(args_0); } diff --git a/libclc/test/binding/core/ConvertFToS_Rschar_sat.cl b/libclc/test/binding/core/ConvertFToS_Rschar_sat.cl index 2b2a895e9516b..b6cf3ae31adc0 100644 --- a/libclc/test/binding/core/ConvertFToS_Rschar_sat.cl +++ b/libclc/test/binding/core/ConvertFToS_Rschar_sat.cl @@ -18,15 +18,15 @@ test___spirv_ConvertFToS_Rschar_sat(__clc_fp32_t args_0) { } #ifdef cl_khr_fp64 -__attribute__((overloadable)) -__clc_schar_t test___spirv_ConvertFToS_Rschar_sat(__clc_fp64_t args_0) { +__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) { +__attribute__((overloadable)) __clc_schar_t +test___spirv_ConvertFToS_Rschar_sat(__clc_fp16_t args_0) { return __spirv_ConvertFToS_Rschar_sat(args_0); } diff --git a/libclc/test/binding/core/ConvertFToS_Rschar_sat_rte.cl b/libclc/test/binding/core/ConvertFToS_Rschar_sat_rte.cl index cab865e9e8e78..38b15c449d020 100644 --- a/libclc/test/binding/core/ConvertFToS_Rschar_sat_rte.cl +++ b/libclc/test/binding/core/ConvertFToS_Rschar_sat_rte.cl @@ -18,15 +18,15 @@ test___spirv_ConvertFToS_Rschar_sat_rte(__clc_fp32_t args_0) { } #ifdef cl_khr_fp64 -__attribute__((overloadable)) -__clc_schar_t test___spirv_ConvertFToS_Rschar_sat_rte(__clc_fp64_t args_0) { +__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) { +__attribute__((overloadable)) __clc_schar_t +test___spirv_ConvertFToS_Rschar_sat_rte(__clc_fp16_t args_0) { return __spirv_ConvertFToS_Rschar_sat_rte(args_0); } diff --git a/libclc/test/binding/core/ConvertFToS_Rschar_sat_rtn.cl b/libclc/test/binding/core/ConvertFToS_Rschar_sat_rtn.cl index 3b17c21d577b0..75f275b558e31 100644 --- a/libclc/test/binding/core/ConvertFToS_Rschar_sat_rtn.cl +++ b/libclc/test/binding/core/ConvertFToS_Rschar_sat_rtn.cl @@ -18,15 +18,15 @@ test___spirv_ConvertFToS_Rschar_sat_rtn(__clc_fp32_t args_0) { } #ifdef cl_khr_fp64 -__attribute__((overloadable)) -__clc_schar_t test___spirv_ConvertFToS_Rschar_sat_rtn(__clc_fp64_t args_0) { +__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) { +__attribute__((overloadable)) __clc_schar_t +test___spirv_ConvertFToS_Rschar_sat_rtn(__clc_fp16_t args_0) { return __spirv_ConvertFToS_Rschar_sat_rtn(args_0); } diff --git a/libclc/test/binding/core/ConvertFToS_Rschar_sat_rtp.cl b/libclc/test/binding/core/ConvertFToS_Rschar_sat_rtp.cl index 79508de38c95d..275d7bb4d4acb 100644 --- a/libclc/test/binding/core/ConvertFToS_Rschar_sat_rtp.cl +++ b/libclc/test/binding/core/ConvertFToS_Rschar_sat_rtp.cl @@ -18,15 +18,15 @@ test___spirv_ConvertFToS_Rschar_sat_rtp(__clc_fp32_t args_0) { } #ifdef cl_khr_fp64 -__attribute__((overloadable)) -__clc_schar_t test___spirv_ConvertFToS_Rschar_sat_rtp(__clc_fp64_t args_0) { +__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) { +__attribute__((overloadable)) __clc_schar_t +test___spirv_ConvertFToS_Rschar_sat_rtp(__clc_fp16_t args_0) { return __spirv_ConvertFToS_Rschar_sat_rtp(args_0); } diff --git a/libclc/test/binding/core/ConvertFToS_Rschar_sat_rtz.cl b/libclc/test/binding/core/ConvertFToS_Rschar_sat_rtz.cl index 177b10b7f8454..44525d6b062ef 100644 --- a/libclc/test/binding/core/ConvertFToS_Rschar_sat_rtz.cl +++ b/libclc/test/binding/core/ConvertFToS_Rschar_sat_rtz.cl @@ -18,15 +18,15 @@ test___spirv_ConvertFToS_Rschar_sat_rtz(__clc_fp32_t args_0) { } #ifdef cl_khr_fp64 -__attribute__((overloadable)) -__clc_schar_t test___spirv_ConvertFToS_Rschar_sat_rtz(__clc_fp64_t args_0) { +__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) { +__attribute__((overloadable)) __clc_schar_t +test___spirv_ConvertFToS_Rschar_sat_rtz(__clc_fp16_t args_0) { return __spirv_ConvertFToS_Rschar_sat_rtz(args_0); }