[llvm] 7b9d667 - [SelectionDAG] When splitting gather operands in type legalization, set MMO size to UnknownSize

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Wed May 6 19:57:55 PDT 2020


Author: Craig Topper
Date: 2020-05-06T19:57:14-07:00
New Revision: 7b9d6673bfe19c5165f217656f88848389072716

URL: https://github.com/llvm/llvm-project/commit/7b9d6673bfe19c5165f217656f88848389072716
DIFF: https://github.com/llvm/llvm-project/commit/7b9d6673bfe19c5165f217656f88848389072716.diff

LOG: [SelectionDAG] When splitting gather operands in type legalization, set MMO size to UnknownSize

I missed this case when I did the same for gather results and scatter
operands in c69a4d6bef0a1350f509f35beb450dccc2a6c5e2.

Added: 
    

Modified: 
    llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
index 3fdb73cdd533..f43b7c5f43a4 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
@@ -2288,17 +2288,14 @@ SDValue DAGTypeLegalizer::SplitVecOp_MGATHER(MaskedGatherSDNode *MGT,
     std::tie(IndexLo, IndexHi) = DAG.SplitVector(Index, dl);
 
   MachineMemOperand *MMO = DAG.getMachineFunction().getMachineMemOperand(
-      MGT->getPointerInfo(), MachineMemOperand::MOLoad, LoMemVT.getStoreSize(),
-      Alignment, MGT->getAAInfo(), MGT->getRanges());
+      MGT->getPointerInfo(), MachineMemOperand::MOLoad,
+      MemoryLocation::UnknownSize, Alignment, MGT->getAAInfo(),
+      MGT->getRanges());
 
   SDValue OpsLo[] = {Ch, PassThruLo, MaskLo, Ptr, IndexLo, Scale};
   SDValue Lo = DAG.getMaskedGather(DAG.getVTList(LoVT, MVT::Other), LoVT, dl,
                                    OpsLo, MMO, MGT->getIndexType());
 
-  MMO = DAG.getMachineFunction().getMachineMemOperand(
-      MGT->getPointerInfo(), MachineMemOperand::MOLoad, HiMemVT.getStoreSize(),
-      Alignment, MGT->getAAInfo(), MGT->getRanges());
-
   SDValue OpsHi[] = {Ch, PassThruHi, MaskHi, Ptr, IndexHi, Scale};
   SDValue Hi = DAG.getMaskedGather(DAG.getVTList(HiVT, MVT::Other), HiVT, dl,
                                    OpsHi, MMO, MGT->getIndexType());


        


More information about the llvm-commits mailing list