The r600 path has never actually worked sinced double is not implemented
there.
llvm-svn: 276009
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
+#ifdef __AMDGCN__
+ #define __clc_builtin_rsq __builtin_amdgcn_rsq
+#else
+ #define __clc_builtin_rsq __builtin_r600_recipsqrt_ieee
+#endif
_CLC_OVERLOAD _CLC_DEF double sqrt(double x) {
unsigned exp1 = vcc ? 0xffffff80 : 0;
double v01 = ldexp(x, exp0);
- double v23 = __builtin_amdgpu_rsq(v01);
+ double v23 = __clc_builtin_rsq(v01);
double v45 = v01 * v23;
v23 = v23 * 0.5;