[llvm] [SeparateConstOffsetFromGEP] propagate const offset through GEP chains (PR #143470)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 20 14:31:47 PDT 2025


================
@@ -1242,11 +1266,13 @@ bool SeparateConstOffsetFromGEP::run(Function &F) {
 
   DL = &F.getDataLayout();
   bool Changed = false;
-  for (BasicBlock &B : F) {
-    if (!DT->isReachableFromEntry(&B))
+
+  ReversePostOrderTraversal<Function *> RPOT(&F);
----------------
nikic wrote:

Is there test coverage for this?

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


More information about the llvm-commits mailing list