diff options
author | Jolanta Jensen <jolanta.jensen@arm.com> | 2022-06-13 14:37:19 +0100 |
---|---|---|
committer | Jolanta Jensen <jolanta.jensen@arm.com> | 2022-06-27 11:37:40 +0100 |
commit | 5830da1f8625d2bf94180df997ae78c37f378480 (patch) | |
tree | 986bbccd536fbf0ef3290bbdb961218fc06f3447 /clang/lib/Basic | |
parent | c06f01ffee8677754a40543ab809c9e3e7c02a77 (diff) | |
download | llvm-5830da1f8625d2bf94180df997ae78c37f378480.zip llvm-5830da1f8625d2bf94180df997ae78c37f378480.tar.gz llvm-5830da1f8625d2bf94180df997ae78c37f378480.tar.bz2 |
[AArch64] Define __FP_FAST_FMA[F]
Libraries use this flag to decide whether to use the fma builtin.
Author: Paul Walker
Differential Revision: https://reviews.llvm.org/D127655
Diffstat (limited to 'clang/lib/Basic')
-rw-r--r-- | clang/lib/Basic/Targets/AArch64.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Basic/Targets/AArch64.cpp b/clang/lib/Basic/Targets/AArch64.cpp index 3886205..60ef52a 100644 --- a/clang/lib/Basic/Targets/AArch64.cpp +++ b/clang/lib/Basic/Targets/AArch64.cpp @@ -485,6 +485,10 @@ void AArch64TargetInfo::getTargetDefines(const LangOptions &Opts, Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4"); Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8"); + // Allow detection of fast FMA support. + Builder.defineMacro("__FP_FAST_FMA", "1"); + Builder.defineMacro("__FP_FAST_FMAF", "1"); + if (Opts.VScaleMin && Opts.VScaleMin == Opts.VScaleMax) { Builder.defineMacro("__ARM_FEATURE_SVE_BITS", Twine(Opts.VScaleMin * 128)); Builder.defineMacro("__ARM_FEATURE_SVE_VECTOR_OPERATORS"); |