Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Require the
cx16
feature on Intel CPUs when threading is enabled
This makes 128-bit atomics work on Intel. Without this feature, LLVM does not always know how to generate the respective code. The CPU feature `cx16` describes whether the CPU supports the `cmpxchg16b` instruction. All modern Intel CPUs support this feature; see the discussion in JuliaLang#14818. When Julia generates code for a `native` 64-bit CPU, this flag is already set correctly. However, when Julia generates code for either a 32-bit or a `generic` Intel CPU, then LLVM assumes pessimistically that this feature is not present. According to Wikipedia <https://en.wikipedia.org/wiki/X86-64>, this is only relevant for "early AMD64 processors", and "the 64-bit version of Windows 8.1 requires the instruction". I thus suggest to require this instruction as well when threading is enabled. The alternative is to disable support for 128-bit atomics. The generic CPU target is apparently specified at many occasions, including for 32-bit Intel CPUs and in Travis. Closes JuliaLang#14818.
- Loading branch information