[llvm] [SimplifyCFG] Don't use a mask for lookup tables generated from switches with an unreachable default case (PR #94468)
    via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Jun  5 22:57:13 PDT 2024
    
    
  
================
@@ -6895,8 +6895,9 @@ static bool SwitchToLookupTable(SwitchInst *SI, IRBuilder<> &Builder,
   for (PHINode *PHI : PHIs) {
     const ResultListTy &ResultList = ResultLists[PHI];
 
-    // If using a bitmask, use any value to fill the lookup table holes.
-    Constant *DV = NeedMask ? ResultLists[PHI][0].second : DefaultResults[PHI];
+    // Use any value to fill the lookup table holes.
+    Constant *DV = HolesHaveUndefinedResults ? ResultLists[PHI][0].second
----------------
DianQK wrote:
But I'm not sure if this makes sense. :)
https://github.com/llvm/llvm-project/pull/94468
    
    
More information about the llvm-commits
mailing list