[llvm] [SwitchLowering] Support merging 0 and power-of-2 case. (PR #139736)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed May 28 11:19:25 PDT 2025


================
@@ -12250,10 +12260,11 @@ void SelectionDAGBuilder::lowerWorkItem(SwitchWorkListItem W, Value *Cond,
         }
         break;
       }
+      case CC_And:
       case CC_Range: {
         const Value *RHS, *LHS, *MHS;
         ISD::CondCode CC;
-        if (I->Low == I->High) {
+        if (I->Low == I->High || I->Kind == CC_And) {
----------------
fhahn wrote:

Thanks, added assert and removed the check. That was a left-over from an earlier version.

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


More information about the llvm-commits mailing list