CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
124 lines
4.2 KiB
Common Lisp
124 lines
4.2 KiB
Common Lisp
// RUN: %clang_cc1 %s -verify -cl-std=CL1.1 -triple x86_64-unknown-linux-gnu
|
|
// RUN: %clang_cc1 %s -verify -cl-std=CL1.2 -triple x86_64-unknown-linux-gnu
|
|
// RUN: %clang_cc1 %s -verify -cl-std=CL2.0 -triple x86_64-unknown-linux-gnu
|
|
|
|
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
|
|
|
|
typedef __attribute__((ext_vector_type(4))) float float4;
|
|
typedef __attribute__((ext_vector_type(4))) double double4;
|
|
typedef __attribute__((ext_vector_type(4))) int int4;
|
|
typedef __attribute__((ext_vector_type(4))) long long4;
|
|
|
|
kernel void float_ops() {
|
|
int flaf = 0.0f && 0.0f;
|
|
#if __OPENCL_C_VERSION__ < 120
|
|
// expected-error@-2{{invalid operands}}
|
|
#endif
|
|
int flof = 0.0f || 0.0f;
|
|
#if __OPENCL_C_VERSION__ < 120
|
|
// expected-error@-2{{invalid operands}}
|
|
#endif
|
|
float fbaf = 0.0f & 0.0f; // expected-error {{invalid operands}}
|
|
float fbof = 0.0f | 0.0f; // expected-error {{invalid operands}}
|
|
float fbxf = 0.0f ^ 0.0f; // expected-error {{invalid operands}}
|
|
int flai = 0.0f && 0;
|
|
#if __OPENCL_C_VERSION__ < 120
|
|
// expected-error@-2{{invalid operands}}
|
|
#endif
|
|
int floi = 0.0f || 0;
|
|
#if __OPENCL_C_VERSION__ < 120
|
|
// expected-error@-2{{invalid operands}}
|
|
#endif
|
|
float ibaf = 0 & 0.0f; // expected-error {{invalid operands to binary expression ('int' and 'float')}}
|
|
float ibof = 0 | 0.0f; // expected-error {{invalid operands}}
|
|
float bnf = ~0.0f;// expected-error {{invalid argument type}}
|
|
float lnf = !0.0f;
|
|
#if __OPENCL_C_VERSION__ < 120
|
|
// expected-error@-2{{invalid argument type}}
|
|
#endif
|
|
float fcst = 5.5f;
|
|
float fremainder = fcst % 2.0f; // expected-error {{invalid operands to binary expression}}
|
|
}
|
|
|
|
kernel void vec_float_ops() {
|
|
float4 f4 = (float4)(0, 0, 0, 0);
|
|
int4 f4laf = f4 && 0.0f;
|
|
#if __OPENCL_C_VERSION__ < 120
|
|
// expected-error@-2{{invalid operands}}
|
|
#endif
|
|
int4 f4lof = f4 || 0.0f;
|
|
#if __OPENCL_C_VERSION__ < 120
|
|
// expected-error@-2{{invalid operands}}
|
|
#endif
|
|
float4 f4baf = f4 & 0.0f; // expected-error {{invalid operands}}
|
|
float4 f4bof = f4 | 0.0f; // expected-error {{invalid operands}}
|
|
float4 f4bxf = f4 ^ 0.0f; // expected-error {{invalid operands}}
|
|
float bnf4 = ~f4; // expected-error {{invalid argument type}}
|
|
int4 lnf4 = !f4;
|
|
#if __OPENCL_C_VERSION__ < 120
|
|
// expected-error@-2{{invalid argument type}}
|
|
#endif
|
|
float4 f4cst = (float4)(5.5f, 5.5f, 5.5f, 5.5f);
|
|
float4 f4remainder = f4cst % (float4)(2.0f, 2.0f, 2.0f, 2.0f); // expected-error {{invalid operands to binary expression}}
|
|
}
|
|
|
|
kernel void double_ops() {
|
|
int flaf = 0.0 && 0.0;
|
|
#if __OPENCL_C_VERSION__ < 120
|
|
// expected-error@-2{{invalid operands}}
|
|
#endif
|
|
int flof = 0.0 || 0.0;
|
|
#if __OPENCL_C_VERSION__ < 120
|
|
// expected-error@-2{{invalid operands}}
|
|
#endif
|
|
double fbaf = 0.0 & 0.0; // expected-error {{invalid operands}}
|
|
double fbof = 0.0 | 0.0; // expected-error {{invalid operands}}
|
|
double fbxf = 0.0 ^ 0.0; // expected-error {{invalid operands}}
|
|
int flai = 0.0 && 0;
|
|
#if __OPENCL_C_VERSION__ < 120
|
|
// expected-error@-2{{invalid operands}}
|
|
#endif
|
|
int floi = 0.0 || 0;
|
|
#if __OPENCL_C_VERSION__ < 120
|
|
// expected-error@-2{{invalid operands}}
|
|
#endif
|
|
double ibaf = 0 & 0.0; // expected-error {{invalid operands}}
|
|
double ibof = 0 | 0.0; // expected-error {{invalid operands}}
|
|
double bnf = ~0.0; // expected-error {{invalid argument type}}
|
|
double lnf = !0.0;
|
|
#if __OPENCL_C_VERSION__ < 120
|
|
// expected-error@-2{{invalid argument type}}
|
|
#endif
|
|
double dcst = 5.5;
|
|
double dremainder = dcst % 2.0; // expected-error {{invalid operands to binary expression}}
|
|
}
|
|
|
|
kernel void vec_double_ops() {
|
|
double4 f4 = (double4)(0, 0, 0, 0);
|
|
long4 f4laf = f4 && 0.0;
|
|
#if __OPENCL_C_VERSION__ < 120
|
|
// expected-error@-2{{invalid operands}}
|
|
#endif
|
|
long4 f4lof = f4 || 0.0;
|
|
#if __OPENCL_C_VERSION__ < 120
|
|
// expected-error@-2{{invalid operands}}
|
|
#endif
|
|
double4 f4baf = f4 & 0.0; // expected-error {{invalid operands}}
|
|
double4 f4bof = f4 | 0.0; // expected-error {{invalid operands}}
|
|
double4 f4bxf = f4 ^ 0.0; // expected-error {{invalid operands}}
|
|
double bnf4 = ~f4; // expected-error {{invalid argument type}}
|
|
long4 lnf4 = !f4;
|
|
#if __OPENCL_C_VERSION__ < 120
|
|
// expected-error@-2{{invalid argument type}}
|
|
#endif
|
|
}
|
|
|
|
kernel void pointer_ops(){
|
|
global int* p;
|
|
bool b = !p;
|
|
b = p==0;
|
|
int i;
|
|
b = !&i; // expected-warning {{address of 'i' will always evaluate to 'true'}}
|
|
b = &i==(int *)1;
|
|
}
|