[IPSCCP][FuncSpec] Protect against metadata access from call args. (#124284)
[llvm-project.git] / libclc / clc / lib / generic / relational / clc_isnormal.cl
blobe0da8cc0756f420406930e1bab12833d5074cf26
1 #include <clc/internal/clc.h>
2 #include <clc/relational/relational.h>
4 _CLC_DEFINE_RELATIONAL_UNARY(int, __clc_isnormal, __builtin_isnormal, float)
6 #ifdef cl_khr_fp64
8 #pragma OPENCL EXTENSION cl_khr_fp64 : enable
10 // The scalar version of __clc_isnormal(double) returns an int, but the vector
11 // versions return long.
12 _CLC_DEF _CLC_OVERLOAD int __clc_isnormal(double x) {
13 return __builtin_isnormal(x);
16 _CLC_DEFINE_RELATIONAL_UNARY_VEC_ALL(long, __clc_isnormal, double)
18 #endif
19 #ifdef cl_khr_fp16
21 #pragma OPENCL EXTENSION cl_khr_fp16 : enable
23 // The scalar version of __clc_isnormal(half) returns an int, but the vector
24 // versions return short.
25 _CLC_DEF _CLC_OVERLOAD int __clc_isnormal(half x) {
26 return __builtin_isnormal(x);
29 _CLC_DEFINE_RELATIONAL_UNARY_VEC_ALL(short, __clc_isnormal, half)
31 #endif