[llvm] [PPC] Set minimum of largest number of comparisons to use bit test for switch lowering (PR #155910)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 22 13:52:35 PDT 2025


================
@@ -1441,9 +1441,9 @@ class LLVM_ABI TargetLoweringBase {
   /// \p High as its lowest and highest case values, and expects \p NumCmps
   /// case value comparisons. Check if the number of destinations, comparison
   /// metric, and range are all suitable.
-  bool isSuitableForBitTests(unsigned NumDests, unsigned NumCmps,
-                             const APInt &Low, const APInt &High,
-                             const DataLayout &DL) const {
+  bool isSuitableForBitTests(
+      const DenseMap<const BasicBlock *, unsigned int> DestCmps,
----------------
efriedma-quic wrote:

```suggestion
      const DenseMap<const BasicBlock *, unsigned int> &DestCmps,
```

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


More information about the llvm-commits mailing list