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

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 14 00:29:36 PST 2023


nikic added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp:301
+      // All incoming values must be instructions for replacability
+      if (llvm::any_of(PHI->incoming_values(),
+                       [](Value *V) { return !isa<Instruction>(V); }))
----------------
Drop `llvm::` prefix.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp:308
+            return !Worklist.contains(cast<Instruction>(V));
+          }))
+        continue;
----------------
Missing the insertion into ValuesToRevisit here?


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