Skip to content

Commit 80fa796

Browse files
committed
[X86] combineStore - add early out for 32-bit f64 store combines. NFC.
1 parent 83dabd0 commit 80fa796

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50472,11 +50472,14 @@ static SDValue combineStore(SDNode *N, SelectionDAG &DAG,
5047250472
bool NoImplicitFloatOps = F.hasFnAttribute(Attribute::NoImplicitFloat);
5047350473
bool F64IsLegal =
5047450474
!Subtarget.useSoftFloat() && !NoImplicitFloatOps && Subtarget.hasSSE2();
50475-
if ((VT == MVT::i64 && F64IsLegal && !Subtarget.is64Bit()) &&
50476-
isa<LoadSDNode>(St->getValue()) &&
50475+
50476+
if (!F64IsLegal || Subtarget.is64Bit())
50477+
return SDValue();
50478+
50479+
if (VT == MVT::i64 && isa<LoadSDNode>(St->getValue()) &&
5047750480
cast<LoadSDNode>(St->getValue())->isSimple() &&
5047850481
St->getChain().hasOneUse() && St->isSimple()) {
50479-
LoadSDNode *Ld = cast<LoadSDNode>(St->getValue().getNode());
50482+
auto *Ld = cast<LoadSDNode>(St->getValue());
5048050483

5048150484
if (!ISD::isNormalLoad(Ld))
5048250485
return SDValue();
@@ -50503,7 +50506,7 @@ static SDValue combineStore(SDNode *N, SelectionDAG &DAG,
5050350506
// to get past legalization. The execution dependencies fixup pass will
5050450507
// choose the optimal machine instruction for the store if this really is
5050550508
// an integer or v2f32 rather than an f64.
50506-
if (VT == MVT::i64 && F64IsLegal && !Subtarget.is64Bit() &&
50509+
if (VT == MVT::i64 &&
5050750510
St->getOperand(1).getOpcode() == ISD::EXTRACT_VECTOR_ELT) {
5050850511
SDValue OldExtract = St->getOperand(1);
5050950512
SDValue ExtOp0 = OldExtract.getOperand(0);

0 commit comments

Comments
 (0)