[llvm] [CodeGenPrepare] Handle address sinking obtained from invoke (PR #143566)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 12 19:14:27 PDT 2025


================
@@ -6099,6 +6099,13 @@ bool CodeGenPrepare::optimizeMemoryInst(Instruction *MemoryInst, Value *Addr,
       }
 
       if (!ResultIndex) {
+        auto PtrInst = dyn_cast<Instruction>(ResultPtr);
+        // Here we know that we have just a pointer without any offsets.  If
+        // this pointer comes from a different from the current basic block we
----------------
weiguozhi wrote:

different BB

https://github.com/llvm/llvm-project/pull/143566


More information about the llvm-commits mailing list