[PATCH] D136201: [InstCombine] Replace alloca with phi uses

Anshil Gandhi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 19 00:58:33 PDT 2022


gandhi21299 marked 3 inline comments as done.
gandhi21299 added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp:260-263
+    } else if (auto *PHI = dyn_cast<PHINode>(Inst)) {
+      for (unsigned int I = 0; I < PHI->getNumOperands(); ++I)
+        Worklist.insert(cast<Instruction>(PHI->getOperand(I)));
+      Worklist.insert(PHI);
----------------
arsenm wrote:
> Maybe in a separate patch, but if you're touching this, might as well handle select too
Sounds good, I will handle select in a seperate patch.


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