[X86] LowerATOMIC_STORE - on 32-bit targets see if i64 values were originally legal f64 values that we can store directly. (#171602)
Based off feedback from #171478
This commit is contained in:
parent
59b13d6d9c
commit
6573f62a88
@ -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;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user