[Libclc-dev] [PATCH 1/1] math.h: Set HAVE_HW_FMA32 based on compiler provided macro
Jan Vesely via Libclc-dev
libclc-dev at lists.llvm.org
Sun Jan 28 16:58:51 PST 2018
On Thu, 2018-01-18 at 18:06 -0500, Jan Vesely wrote:
> Fixes sin/cos piglits on non-FMA capable asics.
> Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=35983
>
> Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
> ---
> generic/lib/math/math.h | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/generic/lib/math/math.h b/generic/lib/math/math.h
> index f46c7ea..0a10991 100644
> --- a/generic/lib/math/math.h
> +++ b/generic/lib/math/math.h
> @@ -31,7 +31,12 @@
> #define PNOR 0x100
> #define PINF 0x200
>
> +#if (defined __AMDGCN__ | defined __R600__) & !defined __HAS_FMAF__
> +#define HAVE_HW_FMA32() (0)
> +#else
> #define HAVE_HW_FMA32() (1)
> +#endif
> +
> #define HAVE_BITALIGN() (0)
> #define HAVE_FAST_FMA32() (0)
>
ping.
we need this to not use fma in sin/cos/tan on asics that don't have the
instruction.
Jan
--
Jan Vesely <jan.vesely at rutgers.edu>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.llvm.org/pipermail/libclc-dev/attachments/20180128/45aa7c3b/attachment.sig>
More information about the Libclc-dev
mailing list