From 0ecb5e511e67c4ee8264de7d15a47ac6c84a55cd Mon Sep 17 00:00:00 2001 From: Jan Vesely Date: Mon, 29 Jan 2018 19:05:08 +0000 Subject: math.h: Set HAVE_HW_FMA32 based on compiler provided macro Fixes sin/cos piglits on non-FMA capable asics. Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=35983 Reviewer: Tom Stellard Signed-off-by: Jan Vesely llvm-svn: 323677 --- libclc/generic/lib/math/math.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libclc') diff --git a/libclc/generic/lib/math/math.h b/libclc/generic/lib/math/math.h index f46c7ea7a7d..0a109910bef 100644 --- a/libclc/generic/lib/math/math.h +++ b/libclc/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) -- cgit v1.2.3