Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require the cx16 feature on Intel CPUs when threading is enabled #15219

Merged
merged 1 commit into from
Mar 6, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5794,7 +5794,7 @@ static void init_julia_llvm_env(Module *m)
}

// Helper to figure out what features to set for the LLVM target
// If the user specifies native ( or does not specify ) we default
// If the user specifies native (or does not specify) we default
// using the API provided by LLVM
static inline SmallVector<std::string,10> getTargetFeatures() {
StringMap<bool> HostFeatures;
Expand All @@ -5807,13 +5807,19 @@ static inline SmallVector<std::string,10> getTargetFeatures() {
// Platform specific overides follow
#if defined(_CPU_X86_64_) || defined(_CPU_X86_)
#ifndef USE_MCJIT
// Temporarily disable Haswell BMI2 features due to LLVM bug.
// Temporarily disable Haswell BMI2 features due to LLVM bug.
HostFeatures["bmi2"] = false;
HostFeatures["avx2"] = false;
#endif
#ifdef V128_BUG
HostFeatures["avx"] = false;
#endif
// Require cx16 (cmpxchg16b)
// We need this for 128-bit atomic operations. We only need this
// when threading is enabled; however, to test whether this excludes
// important systems, we require this even when threading is
// disabled.
HostFeatures["cx16"] = true;
#endif

// Figure out if we know the cpu_target
Expand Down