[PATCH] D87149: [InstCombine] erase instructions leading up to unreachable

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 5 06:11:21 PDT 2020


lebedev.ri added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:2805
+  // simple dead code elimination.
+  if (Instruction *Prev = I.getPrevNonDebugInstruction()) {
+    if (!Prev->isEHPad() && isGuaranteedToTransferExecutionToSuccessor(Prev))
----------------
I think this should be a loop, otherwise it may take extra worklist iterations to catch everything


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

https://reviews.llvm.org/D87149



More information about the llvm-commits mailing list