[llvm] [SimplifyCFG] Replace unreachable switch lookup table holes with poison (PR #94990)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 12 17:00:44 PDT 2024


================
@@ -6322,6 +6333,9 @@ SwitchLookupTable::SwitchLookupTable(
       if (!ConstVal) {
         // This is an undef. We could deal with it, but undefs in lookup tables
         // are very seldom. It's probably not worth the additional complexity.
+        // TODO: In switches with holes and an unreachable default branch, this
----------------
DianQK wrote:

Do you want to finish this TODO in this PR? If not, could you change the poison values back to the first value? I'm concerned this might cause some regressions.

https://github.com/llvm/llvm-project/pull/94990


More information about the llvm-commits mailing list