================ @@ -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()) { + SDValue VecVal = DAG.getBitcast(MVT::v2i64, Node->getVal()); + Chain = DAG.getStore(Node->getChain(), dl, VecVal, Node->getBasePtr(), + Node->getMemOperand()); + } + } + // For illegal i64 atomic_stores, we can try to use MOVQ or MOVLPS if SSE // is enabled. - bool NoImplicitFloatOps = - DAG.getMachineFunction().getFunction().hasFnAttribute( - Attribute::NoImplicitFloat); - if (!Subtarget.useSoftFloat() && !NoImplicitFloatOps) { - SDValue Chain; + if (VT == MVT::i64) { if (Subtarget.hasSSE1()) { ---------------- jyknight wrote:
This has an "else if" attached, so better not to. https://github.com/llvm/llvm-project/pull/74275 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits