Date: Sun, 28 Jan 2018 16:10:41 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r328513 - head/contrib/llvm/tools/clang/lib/Basic/Targets Message-ID: <201801281610.w0SGAfTd092661@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Sun Jan 28 16:10:40 2018 New Revision: 328513 URL: https://svnweb.freebsd.org/changeset/base/328513 Log: Pull in r322245 from upstream clang trunk (by Craig Topper): [X86] Make -mavx512f imply -mfma and -mf16c in the frontend like it does in the backend. Similarly, make -mno-fma and -mno-f16c imply -mno-avx512f. Withou this "-mno-sse -mavx512f" ends up with avx512f being enabled in the frontend but disabled in the backend. Reported by: pawel PR: 225488 Modified: head/contrib/llvm/tools/clang/lib/Basic/Targets/X86.cpp Modified: head/contrib/llvm/tools/clang/lib/Basic/Targets/X86.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/Basic/Targets/X86.cpp Sun Jan 28 15:33:32 2018 (r328512) +++ head/contrib/llvm/tools/clang/lib/Basic/Targets/X86.cpp Sun Jan 28 16:10:40 2018 (r328513) @@ -409,7 +409,7 @@ void X86TargetInfo::setSSELevel(llvm::StringMap<bool> if (Enabled) { switch (Level) { case AVX512F: - Features["avx512f"] = true; + Features["avx512f"] = Features["fma"] = Features["f16c"] = true; LLVM_FALLTHROUGH; case AVX2: Features["avx2"] = true; @@ -623,6 +623,8 @@ void X86TargetInfo::setFeatureEnabledImpl(llvm::String } else if (Name == "fma") { if (Enabled) setSSELevel(Features, AVX, Enabled); + else + setSSELevel(Features, AVX512F, Enabled); } else if (Name == "fma4") { setXOPLevel(Features, FMA4, Enabled); } else if (Name == "xop") { @@ -632,6 +634,8 @@ void X86TargetInfo::setFeatureEnabledImpl(llvm::String } else if (Name == "f16c") { if (Enabled) setSSELevel(Features, AVX, Enabled); + else + setSSELevel(Features, AVX512F, Enabled); } else if (Name == "sha") { if (Enabled) setSSELevel(Features, SSE2, Enabled);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801281610.w0SGAfTd092661>