diff options
author | Jan Vesely <jan.vesely@rutgers.edu> | 2018-06-07 20:27:43 +0000 |
---|---|---|
committer | Jan Vesely <jan.vesely@rutgers.edu> | 2018-06-07 20:27:43 +0000 |
commit | 6e85e6309d38393c2a4360f8232d5b11540a6aa4 (patch) | |
tree | 640dcbf971b4a51e0b519f47dfde4b7a5be88d2f /libclc/generic/include/clc | |
parent | 372e3d3e125f16ab818e31a81db93f195cabc159 (diff) | |
download | bcm5719-llvm-6e85e6309d38393c2a4360f8232d5b11540a6aa4.tar.gz bcm5719-llvm-6e85e6309d38393c2a4360f8232d5b11540a6aa4.zip |
math/fma: Add fp32 software implementation
Passes CTS on carrizo (when forced to use sw fma) and turks.
Reviewer: Tom Stellard <tstellar@redhat.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 334226
Diffstat (limited to 'libclc/generic/include/clc')
-rw-r--r-- | libclc/generic/include/clc/math/fma.h | 11 | ||||
-rw-r--r-- | libclc/generic/include/clc/math/ternary_decl.inc | 1 |
2 files changed, 7 insertions, 5 deletions
diff --git a/libclc/generic/include/clc/math/fma.h b/libclc/generic/include/clc/math/fma.h index 02d39f68167..c7c23eb2055 100644 --- a/libclc/generic/include/clc/math/fma.h +++ b/libclc/generic/include/clc/math/fma.h @@ -1,6 +1,7 @@ -#undef fma -#define fma __clc_fma +#define __CLC_BODY <clc/math/ternary_decl.inc> +#define __CLC_FUNCTION fma -#define __CLC_FUNCTION __clc_fma -#define __CLC_INTRINSIC "llvm.fma" -#include <clc/math/ternary_intrin.inc> +#include <clc/math/gentype.inc> + +#undef __CLC_BODY +#undef __CLC_FUNCTION diff --git a/libclc/generic/include/clc/math/ternary_decl.inc b/libclc/generic/include/clc/math/ternary_decl.inc new file mode 100644 index 00000000000..0598684ea40 --- /dev/null +++ b/libclc/generic/include/clc/math/ternary_decl.inc @@ -0,0 +1 @@ +_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION(__CLC_GENTYPE a, __CLC_GENTYPE b, __CLC_GENTYPE c); |