Author: jvesely Date: Wed May 2 22:44:28 2018 New Revision: 331435 URL: http://llvm.org/viewvc/llvm-project?rev=331435&view=rev Log: remquo: Flush denormals if not supported
It's OK to either flush to 0 or return denormal result if the device does not support denormals. See sec 7.2 and 7.5.3 of OCL specs. Fixes CTS on carrizo and turks. Signed-off-by: Jan Vesely <jan.ves...@rutgers.edu> Reviewer: Aaron Watry <awa...@gmail.com> Modified: libclc/trunk/generic/lib/math/clc_remquo.cl Modified: libclc/trunk/generic/lib/math/clc_remquo.cl URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/lib/math/clc_remquo.cl?rev=331435&r1=331434&r2=331435&view=diff ============================================================================== --- libclc/trunk/generic/lib/math/clc_remquo.cl (original) +++ libclc/trunk/generic/lib/math/clc_remquo.cl Wed May 2 22:44:28 2018 @@ -29,6 +29,8 @@ _CLC_DEF _CLC_OVERLOAD float __clc_remquo(float x, float y, __private int *quo) { + x = __clc_flush_denormal_if_not_supported(x); + y = __clc_flush_denormal_if_not_supported(y); int ux = as_int(x); int ax = ux & EXSIGNBIT_SP32; float xa = as_float(ax); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits