On Mon, 2018-01-29 at 22:15 +0300, Roman Lebedev via cfe-commits wrote: > On Mon, Jan 29, 2018 at 10:05 PM, Jan Vesely via cfe-commits > <cfe-commits@lists.llvm.org> wrote: > > Author: jvesely > > Date: Mon Jan 29 11:05:08 2018 > > New Revision: 323677 > > > > URL: http://llvm.org/viewvc/llvm-project?rev=323677&view=rev > > Log: > > 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 <jan.ves...@rutgers.edu> > > > > Modified: > > libclc/trunk/generic/lib/math/math.h > > > > Modified: libclc/trunk/generic/lib/math/math.h > > URL: > > http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/lib/math/math.h?rev=323677&r1=323676&r2=323677&view=diff > > ============================================================================== > > --- libclc/trunk/generic/lib/math/math.h (original) > > +++ libclc/trunk/generic/lib/math/math.h Mon Jan 29 11:05:08 2018 > > @@ -31,7 +31,12 @@ > > #define PNOR 0x100 > > #define PINF 0x200 > > > > +#if (defined __AMDGCN__ | defined __R600__) & !defined __HAS_FMAF__ > > Shouldn't that be || and && ?
Yes, that would be more readable. It should work the same though, since the values are 0 and 1. Do you want to send a patch? Jan > > > +#define HAVE_HW_FMA32() (0) > > +#else > > #define HAVE_HW_FMA32() (1) > > +#endif > > + > > #define HAVE_BITALIGN() (0) > > #define HAVE_FAST_FMA32() (0) > > > > > > > > _______________________________________________ > > cfe-commits mailing list > > cfe-commits@lists.llvm.org > > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits > > _______________________________________________ > cfe-commits mailing list > cfe-commits@lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
signature.asc
Description: This is a digitally signed message part
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits