[clang] [llvm] [clang-tools-extra] [X86] Use plain load/store instead of cmpxchg16b for atomics with AVX (PR #74275)
James Y Knight via cfe-commits
cfe-commits at lists.llvm.org
Sat Dec 16 07:38:03 PST 2023
================
@@ -31259,14 +31274,23 @@ static SDValue LowerATOMIC_STORE(SDValue Op, SelectionDAG &DAG,
if (!IsSeqCst && IsTypeLegal)
return Op;
- if (VT == MVT::i64 && !IsTypeLegal) {
+ if (!IsTypeLegal && !Subtarget.useSoftFloat() &&
+ !DAG.getMachineFunction().getFunction().hasFnAttribute(
+ Attribute::NoImplicitFloat)) {
+ SDValue Chain;
+ // For illegal i128 atomic_store, when AVX is enabled, we can simply emit a
+ // vector store.
+ if (VT == MVT::i128) {
+ if (Subtarget.is64Bit() && Subtarget.hasAVX()) {
----------------
jyknight wrote:
Done.
https://github.com/llvm/llvm-project/pull/74275
More information about the cfe-commits
mailing list