[libc-commits] [PATCH] D152410: [libc] Update FMA detection macro for x86-64 targets.
Tue Ly via Phabricator via libc-commits
libc-commits at lists.llvm.org
Wed Jun 7 16:24:38 PDT 2023
lntue created this revision.
lntue added reviewers: michaelrj, sivachandra, brooksmoses.
Herald added a subscriber: pengfei.
Herald added projects: libc-project, All.
lntue requested review of this revision.
To generate fma instructions for x86-64 targets, we need both -mavx2
and -mfma.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D152410
Files:
libc/src/__support/macros/properties/cpu_features.h
Index: libc/src/__support/macros/properties/cpu_features.h
===================================================================
--- libc/src/__support/macros/properties/cpu_features.h
+++ libc/src/__support/macros/properties/cpu_features.h
@@ -36,7 +36,7 @@
#define LIBC_TARGET_CPU_HAS_AVX512BW
#endif
-#if defined(__ARM_FEATURE_FMA) || defined(__AVX2__) || defined(__FMA__) || \
+#if defined(__ARM_FEATURE_FMA) || (defined(__AVX2__) && defined(__FMA__)) || \
defined(__LIBC_RISCV_USE_FMA)
#define LIBC_TARGET_CPU_HAS_FMA
#endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152410.529468.patch
Type: text/x-patch
Size: 545 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230607/a1c2900a/attachment.bin>
More information about the libc-commits
mailing list