brintos

brintos / llvm-project-archived public Read only

0
0
Text · 6.7 KiB · e95f94d Raw
113 lines · plain
1// RUN: %clang_cc1 -triple spir-unknown-unknown %s -E -dM -o - -x cl -cl-std=CL3.0 -cl-ext=-all \2// RUN:   | FileCheck -match-full-lines %s  --check-prefix=NO-FEATURES3// RUN: %clang_cc1 -triple spir-unknown-unknown %s -E -dM -o - -x cl -cl-std=CL3.0 -cl-ext=+all \4// RUN:   | FileCheck -match-full-lines %s  --check-prefix=FEATURES5// RUN: %clang_cc1 -triple r600-unknown-unknown %s -E -dM -o - -x cl -cl-std=CL3.0 \6// RUN:   | FileCheck -match-full-lines %s  --check-prefix=NO-FEATURES7// RUN: %clang_cc1 -triple r600-unknown-unknown %s -E -dM -o - -x cl -cl-std=CL3.0 -cl-ext=+all \8// RUN:   | FileCheck -match-full-lines %s  --check-prefix=FEATURES9// RUN: %clang_cc1 -triple spir-unknown-unknown %s -E -dM -o - -x cl -cl-std=clc++2021 -cl-ext=-all \10// RUN:   | FileCheck -match-full-lines %s  --check-prefix=NO-FEATURES11// RUN: %clang_cc1 -triple spir-unknown-unknown %s -E -dM -o - -x cl -cl-std=clc++2021 -cl-ext=+all \12// RUN:   | FileCheck -match-full-lines %s  --check-prefix=FEATURES13// RUN: %clang_cc1 -triple r600-unknown-unknown %s -E -dM -o - -x cl -cl-std=clc++2021 \14// RUN:   | FileCheck -match-full-lines %s  --check-prefix=NO-FEATURES15// RUN: %clang_cc1 -triple r600-unknown-unknown %s -E -dM -o - -x cl -cl-std=clc++2021 -cl-ext=+all \16// RUN:   | FileCheck -match-full-lines %s  --check-prefix=FEATURES17 18// For OpenCL C 2.0 feature macros, test that CL2.0 define them but earlier OpenCL19// versions don't define feature macros accidentally.20// RUN: %clang_cc1 -triple spir-unknown-unknown %s -E -dM -o - -x cl -cl-std=CL1.1 \21// RUN:   | FileCheck -match-full-lines %s  --check-prefix=NO-FEATURES22// RUN: %clang_cc1 -triple spir-unknown-unknown %s -E -dM -o - -x cl -cl-std=CL1.2 \23// RUN:   | FileCheck -match-full-lines %s  --check-prefix=NO-FEATURES24// RUN: %clang_cc1 -triple spir-unknown-unknown %s -E -dM -o - -x cl -cl-std=CL2.0 \25// RUN:   | FileCheck -match-full-lines %s  --check-prefix=FEATURES-CL2026// RUN: %clang_cc1 -triple spir-unknown-unknown %s -E -dM -o - -x cl -cl-std=clc++1.0 \27// RUN:   | FileCheck -match-full-lines %s  --check-prefix=FEATURES-CL2028 29// Features can be disabled using -cl-ext=-<feature>.30// RUN: %clang_cc1 -triple spir-unknown-unknown %s -E -dM -o - -x cl -cl-std=CL2.0 -fdeclare-opencl-builtins -finclude-default-header \31// RUN:    -cl-ext=-__opencl_c_integer_dot_product_input_4x8bit \32// RUN:    -cl-ext=-__opencl_c_integer_dot_product_input_4x8bit_packed \33// RUN:   | FileCheck %s --check-prefix=NO-FEATURES-CL2034// RUN: %clang_cc1 -triple spir-unknown-unknown %s -E -dM -o - -x cl -cl-std=CL3.0 -fdeclare-opencl-builtins -finclude-default-header \35// RUN:    -cl-ext=-__opencl_c_work_group_collective_functions, \36// RUN:    -cl-ext=-__opencl_c_atomic_order_seq_cst \37// RUN:    -cl-ext=-__opencl_c_atomic_scope_device \38// RUN:    -cl-ext=-__opencl_c_atomic_scope_all_devices \39// RUN:    -cl-ext=-__opencl_c_read_write_images \40// RUN:   | FileCheck %s --check-prefix=DISABLE-FEATURES41 42// Note that __opencl_c_int64 is always defined assuming43// always compiling for FULL OpenCL profile44 45// FEATURES: #define __opencl_c_3d_image_writes 146// FEATURES: #define __opencl_c_atomic_order_acq_rel 147// FEATURES: #define __opencl_c_atomic_order_seq_cst 148// FEATURES: #define __opencl_c_atomic_scope_all_devices 149// FEATURES: #define __opencl_c_atomic_scope_device 150// FEATURES: #define __opencl_c_device_enqueue 151// FEATURES: #define __opencl_c_ext_image_unorm_int_2_101010 152// FEATURES: #define __opencl_c_ext_image_unsigned_10x6_12x4_14x2 153// FEATURES: #define __opencl_c_fp64 154// FEATURES: #define __opencl_c_generic_address_space 155// FEATURES: #define __opencl_c_images 156// FEATURES: #define __opencl_c_int64 157// FEATURES: #define __opencl_c_integer_dot_product_input_4x8bit 158// FEATURES: #define __opencl_c_integer_dot_product_input_4x8bit_packed 159// FEATURES: #define __opencl_c_kernel_clock_scope_device 160// FEATURES: #define __opencl_c_kernel_clock_scope_sub_group 161// FEATURES: #define __opencl_c_kernel_clock_scope_work_group 162// FEATURES: #define __opencl_c_pipes 163// FEATURES: #define __opencl_c_program_scope_global_variables 164// FEATURES: #define __opencl_c_read_write_images 165// FEATURES: #define __opencl_c_subgroups 166// FEATURES: #define __opencl_c_work_group_collective_functions 167 68// FEATURES-CL20: #define __opencl_c_atomic_order_acq_rel 169// FEATURES-CL20: #define __opencl_c_atomic_order_seq_cst 170// FEATURES-CL20: #define __opencl_c_atomic_scope_all_devices 171// FEATURES-CL20: #define __opencl_c_atomic_scope_device 172// FEATURES-CL20: #define __opencl_c_device_enqueue 173// FEATURES-CL20: #define __opencl_c_generic_address_space 174// FEATURES-CL20: #define __opencl_c_images 175// FEATURES-CL20: #define __opencl_c_int64 176// FEATURES-CL20: #define __opencl_c_pipes 177// FEATURES-CL20: #define __opencl_c_program_scope_global_variables 178// FEATURES-CL20: #define __opencl_c_read_write_images 179// FEATURES-CL20: #define __opencl_c_work_group_collective_functions 180 81// NO-FEATURES: #define __opencl_c_int64 182// NO-FEATURES-NOT: #define __opencl_c_3d_image_writes 183// NO-FEATURES-NOT: #define __opencl_c_atomic_order_acq_rel 184// NO-FEATURES-NOT: #define __opencl_c_atomic_order_seq_cst 185// NO-FEATURES-NOT: #define __opencl_c_atomic_scope_all_devices 186// NO-FEATURES-NOT: #define __opencl_c_atomic_scope_device 187// NO-FEATURES-NOT: #define __opencl_c_device_enqueue 188// NO-FEATURES-NOT: #define __opencl_c_ext_image_unorm_int_2_101010 189// NO-FEATURES-NOT: #define __opencl_c_ext_image_unsigned_10x6_12x4_14x2 190// NO-FEATURES-NOT: #define __opencl_c_fp64 191// NO-FEATURES-NOT: #define __opencl_c_generic_address_space 192// NO-FEATURES-NOT: #define __opencl_c_images 193// NO-FEATURES-NOT: #define __opencl_c_int64 194// NO-FEATURES-NOT: #define __opencl_c_integer_dot_product_input_4x8bit 195// NO-FEATURES-NOT: #define __opencl_c_integer_dot_product_input_4x8bit_packed 196// NO-FEATURES-NOT: #define __opencl_c_kernel_clock_scope_device 197// NO-FEATURES-NOT: #define __opencl_c_kernel_clock_scope_sub_group 198// NO-FEATURES-NOT: #define __opencl_c_kernel_clock_scope_work_group 199// NO-FEATURES-NOT: #define __opencl_c_pipes 1100// NO-FEATURES-NOT: #define __opencl_c_program_scope_global_variables 1101// NO-FEATURES-NOT: #define __opencl_c_read_write_images 1102// NO-FEATURES-NOT: #define __opencl_c_subgroups 1103// NO-FEATURES-NOT: #define __opencl_c_work_group_collective_functions 1104 105// NO-FEATURES-CL20-NOT: #define __opencl_c_integer_dot_product_input_4x8bit106// NO-FEATURES-CL20-NOT: #define __opencl_c_integer_dot_product_input_4x8bit_packed107 108// DISABLE-FEATURES-NOT: #define __opencl_c_work_group_collective_functions109// DISABLE-FEATURES-NOT: #define __opencl_c_atomic_order_seq_cst110// DISABLE-FEATURES-NOT: #define __opencl_c_atomic_scope_all_devices111// DISABLE-FEATURES-NOT: #define __opencl_c_atomic_scope_device112// DISABLE-FEATURES-NOT: #define __opencl_c_read_write_images113