diff options
author | Jan Vesely <jan.vesely@rutgers.edu> | 2018-05-03 05:44:28 +0000 |
---|---|---|
committer | Jan Vesely <jan.vesely@rutgers.edu> | 2018-05-03 05:44:28 +0000 |
commit | 21e77037c0f00b943421884ee18b920b405a517c (patch) | |
tree | 6f80d2f472ea9f6ce7bb9e8350a0170f4cec5cd3 /libclc/generic/lib/math | |
parent | 8db45e4cf170cc6044a0afe7a0ed8876dcd9a863 (diff) | |
download | bcm5719-llvm-21e77037c0f00b943421884ee18b920b405a517c.tar.gz bcm5719-llvm-21e77037c0f00b943421884ee18b920b405a517c.zip |
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.vesely@rutgers.edu>
Reviewer: Aaron Watry <awatry@gmail.com>
llvm-svn: 331435
Diffstat (limited to 'libclc/generic/lib/math')
-rw-r--r-- | libclc/generic/lib/math/clc_remquo.cl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libclc/generic/lib/math/clc_remquo.cl b/libclc/generic/lib/math/clc_remquo.cl index ff741f600c8..3b9159ac967 100644 --- a/libclc/generic/lib/math/clc_remquo.cl +++ b/libclc/generic/lib/math/clc_remquo.cl @@ -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); |