[llvm] r366182 - [X86] In combineStore, don't convert v2f32 load/store pairs to f64 loads/stores.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 15 22:52:27 PDT 2019


Author: ctopper
Date: Mon Jul 15 22:52:27 2019
New Revision: 366182

URL: http://llvm.org/viewvc/llvm-project?rev=366182&view=rev
Log:
[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.

Modified:
    llvm/trunk/lib/Target/X86/X86ISelLowering.cpp

Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=366182&r1=366181&r2=366182&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Mon Jul 15 22:52:27 2019
@@ -40093,7 +40093,7 @@ static SDValue combineStore(SDNode *N, S
   bool NoImplicitFloatOps = F.hasFnAttribute(Attribute::NoImplicitFloat);
   bool F64IsLegal =
       !Subtarget.useSoftFloat() && !NoImplicitFloatOps && Subtarget.hasSSE2();
-  if ((VT.isVector() ||
+  if (((VT.isVector() && !VT.isFloatingPoint()) ||
        (VT == MVT::i64 && F64IsLegal && !Subtarget.is64Bit())) &&
       isa<LoadSDNode>(St->getValue()) &&
       !cast<LoadSDNode>(St->getValue())->isVolatile() &&
@@ -40116,8 +40116,7 @@ static SDValue combineStore(SDNode *N, S
     // Otherwise, if it's legal to use f64 SSE instructions, use f64 load/store
     // pair instead.
     if (Subtarget.is64Bit() || F64IsLegal) {
-      MVT LdVT = (Subtarget.is64Bit() &&
-                  (!VT.isFloatingPoint() || !F64IsLegal)) ? MVT::i64 : MVT::f64;
+      MVT LdVT = Subtarget.is64Bit() ? MVT::i64 : MVT::f64;
       SDValue NewLd = DAG.getLoad(LdVT, LdDL, Ld->getChain(), Ld->getBasePtr(),
                                   Ld->getMemOperand());
 




More information about the llvm-commits mailing list