[llvm] ea7157f - [GlobalISel] Propagate mem operands for indexed load/stores.

Amara Emerson via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 25 14:41:29 PDT 2023


Author: Amara Emerson
Date: 2023-09-25T14:41:20-07:00
New Revision: ea7157ff4f5848454ef3762bd6f60ecb9749ae08

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

LOG: [GlobalISel] Propagate mem operands for indexed load/stores.

There isn't a test for this yet since the combines aren't used atm, but it will
be tested as part of a future commit. I'm just making this a separate change
tidyness reasons.

Added: 
    

Modified: 
    llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp b/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
index dba94fd9b0772b0..ac75b75bd7ae83d 100644
--- a/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
@@ -1078,6 +1078,7 @@ void CombinerHelper::applyCombineIndexedLoadStore(
   MIB.addUse(MatchInfo.Base);
   MIB.addUse(MatchInfo.Offset);
   MIB.addImm(MatchInfo.IsPre);
+  MIB->cloneMemRefs(*MI.getMF(), MI);
   MI.eraseFromParent();
   AddrDef.eraseFromParent();
 


        


More information about the llvm-commits mailing list