Skip to content
Merged
Show file tree
Hide file tree
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
9 changes: 8 additions & 1 deletion llvm/lib/Target/X86/X86ISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33171,7 +33171,14 @@ static SDValue LowerATOMIC_STORE(SDValue Op, SelectionDAG &DAG,
// For illegal i64 atomic_stores, we can try to use MOVQ or MOVLPS if SSE
// is enabled.
if (VT == MVT::i64) {
if (Subtarget.hasSSE1()) {
SDValue BCValue = peekThroughBitcasts(Node->getVal());
if (BCValue.getValueType() == MVT::f64 &&
(Subtarget.hasX87() || Subtarget.hasSSE2())) {
// If the i64 was bitcast from a f64 then we can do the f64 atomic store
// directly with FSTPL/MOVSD.
Chain = DAG.getStore(Node->getChain(), dl, BCValue, Node->getBasePtr(),
Node->getMemOperand());
} else if (Subtarget.hasSSE1()) {
SDValue SclToVec =
DAG.getNode(ISD::SCALAR_TO_VECTOR, dl, MVT::v2i64, Node->getVal());
MVT StVT = Subtarget.hasSSE2() ? MVT::v2i64 : MVT::v4f32;
Expand Down
Loading
Loading