[PATCH] D136201: [InstCombine] Handle PHI nodes in PtrReplacer

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 17 03:59:33 PST 2023


nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp:299
   }
-
   return true;
----------------
Spurious change


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp:308
+      // loop.
+      if (any_of(PHI->incoming_values(), [this, Inst](Value *V) {
+            return !Worklist.contains(cast<Instruction>(V));
----------------
Unneeded `Inst` capture.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136201/new/

https://reviews.llvm.org/D136201



More information about the llvm-commits mailing list