[PATCH] D128897: [SimplifyCFG] Improve SwitchToLookupTable optimization

Hans Wennborg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 8 01:10:59 PDT 2022


hans added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/SimplifyCFG.cpp:6328
+      SI->addCase(ConstantInt::get(MinCaseVal->getType(), CaseVal),
+                  SI->getDefaultDest());
+    // Immediately call SwitchToLookupTable to make sure no other transformation
----------------
I figured we'd extend the table by adding case 0 to ResultLists, not modifying the SwitchInst itself. But if it turns out to be more complicated, I'm not going to insist on it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128897



More information about the llvm-commits mailing list