[PATCH] D88014: [LoopUnswitch] Trivial simplification: remove trivial dead condition after unswitch

Alina Sbirlea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 21 12:37:37 PDT 2020


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

I think in general the pass is not trying to do DCE too, but here it looks cheap to clean the dead code left by the conditional.
Please have MSSA updated though.



================
Comment at: llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp:1156
+  if (ClonedConditionToErase)
+    RecursivelyDeleteTriviallyDeadInstructions(ClonedConditionToErase);
+
----------------
`RecursivelyDeleteTriviallyDeadInstructions(ClonedConditionToErase, nullptr, MSSAU);`


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

https://reviews.llvm.org/D88014



More information about the llvm-commits mailing list