forked from OSchip/llvm-project
math: Use single precision fmax in sp path
Fixes fdim piglit on Turks v2: use CL fmax instead of __builtin Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Tom Stellard <tom.stellard@amd.com> llvm-svn: 269807
This commit is contained in:
parent
35b544adc5
commit
973c1fa5f5
|
@ -25,7 +25,7 @@
|
|||
_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE fdim(__CLC_GENTYPE x, __CLC_GENTYPE y) {
|
||||
if (__builtin_isnan(x) || __builtin_isnan(y))
|
||||
return as_float(QNANBITPATT_SP32);
|
||||
return __builtin_fmax(x - y, 0);
|
||||
return fmax(x - y, 0.0f);
|
||||
}
|
||||
#define __CLC_FDIM_VEC(width) \
|
||||
_CLC_OVERLOAD _CLC_DEF float##width fdim(float##width x, float##width y) { \
|
||||
|
|
Loading…
Reference in New Issue