[PATCH] D109428: [SImplifyCFG] SwitchInst processing redirecting the UB edges from the BB with the phiNode, that contains the UB, to the new BB.

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 8 04:19:04 PDT 2021


mkazantsev added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/SimplifyCFG.cpp:6617
+        } else if (SwitchInst *SI = dyn_cast<SwitchInst>(T)) {
+          // Create the new block in which will redirect the edges that 
+          // lead to undefine behavior
----------------
"Create an unreachable block and redirect all edges going to BB into this block".


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109428



More information about the llvm-commits mailing list