[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:24 PDT 2025
================
@@ -362,6 +362,41 @@ void SwitchCG::SwitchLowering::findBitTestClusters(CaseClusterVector &Clusters,
}
}
Clusters.resize(DstIndex);
+
+ // Check if the clusters contain one checking for 0 and another one checking
+ // for a power-of-2 constant with matching destinations. Those clusters can be
+ // combined to a single ane with CC_And.
----------------
fhahn wrote:
Fixed, thanks
https://github.com/llvm/llvm-project/pull/139736
More information about the llvm-commits
mailing list