Skip to content

Commit c0b2ed6

Browse files
committed
[X86] In combineStore, don't convert v2f32 load/store pairs to f64 loads/stores.
Type legalization can take care of this. This gives DAG combine a little more time with the original types. llvm-svn: 366182
1 parent 47cfe8f commit c0b2ed6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -40093,7 +40093,7 @@ static SDValue combineStore(SDNode *N, SelectionDAG &DAG,
4009340093
bool NoImplicitFloatOps = F.hasFnAttribute(Attribute::NoImplicitFloat);
4009440094
bool F64IsLegal =
4009540095
!Subtarget.useSoftFloat() && !NoImplicitFloatOps && Subtarget.hasSSE2();
40096-
if ((VT.isVector() ||
40096+
if (((VT.isVector() && !VT.isFloatingPoint()) ||
4009740097
(VT == MVT::i64 && F64IsLegal && !Subtarget.is64Bit())) &&
4009840098
isa<LoadSDNode>(St->getValue()) &&
4009940099
!cast<LoadSDNode>(St->getValue())->isVolatile() &&
@@ -40116,8 +40116,7 @@ static SDValue combineStore(SDNode *N, SelectionDAG &DAG,
4011640116
// Otherwise, if it's legal to use f64 SSE instructions, use f64 load/store
4011740117
// pair instead.
4011840118
if (Subtarget.is64Bit() || F64IsLegal) {
40119-
MVT LdVT = (Subtarget.is64Bit() &&
40120-
(!VT.isFloatingPoint() || !F64IsLegal)) ? MVT::i64 : MVT::f64;
40119+
MVT LdVT = Subtarget.is64Bit() ? MVT::i64 : MVT::f64;
4012140120
SDValue NewLd = DAG.getLoad(LdVT, LdDL, Ld->getChain(), Ld->getBasePtr(),
4012240121
Ld->getMemOperand());
4012340122

0 commit comments

Comments
 (0)