From e15a2ad07a2178f7d398890bf252ae0d5254c651 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Fri, 27 Sep 2019 09:54:26 +0000 Subject: [PATCH] Revert r372893 "[CodeGen] Replace -max-jump-table-size with -max-jump-table-targets" This caused severe compile-time regressions, see PR43455. > Modern processors predict the targets of an indirect branch regardless of > the size of any jump table used to glean its target address. Moreover, > branch predictors typically use resources limited by the number of actual > targets that occur at run time. > > This patch changes the semantics of the option `-max-jump-table-size` to limit > the number of different targets instead of the number of entries in a jump > table. Thus, it is now renamed to `-max-jump-table-targets`. > > Before, when `-max-jump-table-size` was specified, it could happen that > cluster jump tables could have targets used repeatedly, but each one was > counted and typically resulted in tables with the same number of entries. > With this patch, when specifying `-max-jump-table-targets`, tables may have > different lengths, since the number of unique targets is counted towards the > limit, but the number of unique targets in tables is the same, but for the > last one containing the balance of targets. > > Differential revision: https://reviews.llvm.org/D60295 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373060 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/BasicTTIImpl.h | 2 +- include/llvm/CodeGen/SwitchLoweringUtils.h | 8 ++ include/llvm/CodeGen/TargetLowering.h | 28 +++---- lib/CodeGen/SwitchLoweringUtils.cpp | 92 ++++++++++------------ lib/CodeGen/TargetLoweringBase.cpp | 22 +++--- lib/Target/AArch64/AArch64ISelLowering.cpp | 7 +- lib/Target/AArch64/AArch64Subtarget.cpp | 4 +- lib/Target/AArch64/AArch64Subtarget.h | 4 +- test/CodeGen/AArch64/max-jump-table.ll | 46 +++++------ 9 files changed, 108 insertions(+), 105 deletions(-) diff --git a/include/llvm/CodeGen/BasicTTIImpl.h b/include/llvm/CodeGen/BasicTTIImpl.h index 8473eb8ebb2..75e0f844fd0 100644 --- a/include/llvm/CodeGen/BasicTTIImpl.h +++ b/include/llvm/CodeGen/BasicTTIImpl.h @@ -373,7 +373,7 @@ public: (MaxCaseVal - MinCaseVal) .getLimitedValue(std::numeric_limits::max() - 1) + 1; // Check whether a range of clusters is dense enough for a jump table - if (TLI->isSuitableForJumpTable(&SI, N, 0, Range)) { + if (TLI->isSuitableForJumpTable(&SI, N, Range)) { JumpTableSize = Range; return 1; } diff --git a/include/llvm/CodeGen/SwitchLoweringUtils.h b/include/llvm/CodeGen/SwitchLoweringUtils.h index ef87c86dfb0..31b5f794d90 100644 --- a/include/llvm/CodeGen/SwitchLoweringUtils.h +++ b/include/llvm/CodeGen/SwitchLoweringUtils.h @@ -221,6 +221,14 @@ struct BitTestBlock { Cases(std::move(C)), Prob(Pr) {} }; +/// Return the range of values within a range. +uint64_t getJumpTableRange(const CaseClusterVector &Clusters, unsigned First, + unsigned Last); + +/// Return the number of cases within a range. +uint64_t getJumpTableNumCases(const SmallVectorImpl &TotalCases, + unsigned First, unsigned Last); + struct SwitchWorkListItem { MachineBasicBlock *MBB; CaseClusterIt FirstCluster; diff --git a/include/llvm/CodeGen/TargetLowering.h b/include/llvm/CodeGen/TargetLowering.h index 8c94456e86a..f6ff00ff085 100644 --- a/include/llvm/CodeGen/TargetLowering.h +++ b/include/llvm/CodeGen/TargetLowering.h @@ -1022,10 +1022,8 @@ public: } /// Return true if lowering to a jump table is suitable for a set of case - /// clusters which may contain \p NumCases cases, \p Range range of values, - /// \p NumTargets targets. - virtual bool isSuitableForJumpTable(const SwitchInst *SI, - uint64_t NumCases, uint64_t NumTargets, + /// clusters which may contain \p NumCases cases, \p Range range of values. + virtual bool isSuitableForJumpTable(const SwitchInst *SI, uint64_t NumCases, uint64_t Range) const { // FIXME: This function check the maximum table size and density, but the // minimum size is not checked. It would be nice if the minimum size is @@ -1034,14 +1032,14 @@ public: // getEstimatedNumberOfCaseClusters() in BasicTTIImpl. const bool OptForSize = SI->getParent()->getParent()->hasOptSize(); const unsigned MinDensity = getMinimumJumpTableDensity(OptForSize); - const unsigned MaxJumpTableTargets = getMaximumJumpTableTargets(); - - // Check whether the number of targets is small enough and + const unsigned MaxJumpTableSize = getMaximumJumpTableSize(); + + // Check whether the number of cases is small enough and // the range is dense enough for a jump table. - if ((OptForSize || NumTargets <= MaxJumpTableTargets) && - NumCases * 100 >= Range * MinDensity) + if ((OptForSize || Range <= MaxJumpTableSize) && + (NumCases * 100 >= Range * MinDensity)) { return true; - + } return false; } @@ -1563,8 +1561,9 @@ public: /// Return lower limit of the density in a jump table. unsigned getMinimumJumpTableDensity(bool OptForSize) const; - /// Return upper limit for number of targets in a jump table. - unsigned getMaximumJumpTableTargets() const; + /// Return upper limit for number of entries in a jump table. + /// Zero if no limit. + unsigned getMaximumJumpTableSize() const; virtual bool isJumpTableRelative() const { return TM.isPositionIndependent(); @@ -1971,8 +1970,9 @@ protected: /// Indicate the minimum number of blocks to generate jump tables. void setMinimumJumpTableEntries(unsigned Val); - /// Indicate the maximum number of targets in jump tables. - void setMaximumJumpTableTargets(unsigned); + /// Indicate the maximum number of entries in jump tables. + /// Set to zero to generate unlimited jump tables. + void setMaximumJumpTableSize(unsigned); /// If set to a physical register, this specifies the register that /// llvm.savestack/llvm.restorestack should save and restore. diff --git a/lib/CodeGen/SwitchLoweringUtils.cpp b/lib/CodeGen/SwitchLoweringUtils.cpp index 2b9999d0b41..83acf7f8071 100644 --- a/lib/CodeGen/SwitchLoweringUtils.cpp +++ b/lib/CodeGen/SwitchLoweringUtils.cpp @@ -11,47 +11,33 @@ // //===----------------------------------------------------------------------===// -#include "llvm/ADT/SmallSet.h" #include "llvm/CodeGen/MachineJumpTableInfo.h" #include "llvm/CodeGen/SwitchLoweringUtils.h" using namespace llvm; using namespace SwitchCG; -// Collection of partition stats, made up of, for a given cluster, -// the range of the cases, their number and the number of unique targets. -struct PartitionStats { - uint64_t Range, Cases, Targets; -}; +uint64_t SwitchCG::getJumpTableRange(const CaseClusterVector &Clusters, + unsigned First, unsigned Last) { + assert(Last >= First); + const APInt &LowCase = Clusters[First].Low->getValue(); + const APInt &HighCase = Clusters[Last].High->getValue(); + assert(LowCase.getBitWidth() == HighCase.getBitWidth()); -static PartitionStats getJumpTableStats(const CaseClusterVector &Clusters, - unsigned First, unsigned Last, - bool HasReachableDefault) { - assert(Last >= First && "Invalid order of clusters"); + // FIXME: A range of consecutive cases has 100% density, but only requires one + // comparison to lower. We should discriminate against such consecutive ranges + // in jump tables. + return (HighCase - LowCase).getLimitedValue((UINT64_MAX - 1) / 100) + 1; +} - SmallSet Targets; - PartitionStats Stats; - - Stats.Cases = 0; - for (unsigned i = First; i <= Last; ++i) { - const APInt &Hi = Clusters[i].High->getValue(), - &Lo = Clusters[i].Low->getValue(); - Stats.Cases += (Hi - Lo).getLimitedValue() + 1; - - Targets.insert(Clusters[i].MBB); - } - assert(Stats.Cases < UINT64_MAX / 100 && "Too many cases"); - - const APInt &Hi = Clusters[Last].High->getValue(), - &Lo = Clusters[First].Low->getValue(); - assert(Hi.getBitWidth() == Lo.getBitWidth()); - Stats.Range = (Hi - Lo).getLimitedValue((UINT64_MAX - 1) / 100) + 1; - assert(Stats.Range >= Stats.Cases && "Invalid range or number of cases"); - - Stats.Targets = - Targets.size() + (HasReachableDefault && Stats.Range > Stats.Cases); - - return Stats; +uint64_t +SwitchCG::getJumpTableNumCases(const SmallVectorImpl &TotalCases, + unsigned First, unsigned Last) { + assert(Last >= First); + assert(TotalCases[Last] >= TotalCases[First]); + uint64_t NumCases = + TotalCases[Last] - (First == 0 ? 0 : TotalCases[First - 1]); + return NumCases; } void SwitchCG::SwitchLowering::findJumpTables(CaseClusterVector &Clusters, @@ -78,13 +64,23 @@ void SwitchCG::SwitchLowering::findJumpTables(CaseClusterVector &Clusters, if (N < 2 || N < MinJumpTableEntries) return; - const bool HasReachableDefault = - !isa(DefaultMBB->getBasicBlock()->getFirstNonPHIOrDbg()); - PartitionStats Stats = - getJumpTableStats(Clusters, 0, N - 1, HasReachableDefault); + // Accumulated number of cases in each cluster and those prior to it. + SmallVector TotalCases(N); + for (unsigned i = 0; i < N; ++i) { + const APInt &Hi = Clusters[i].High->getValue(); + const APInt &Lo = Clusters[i].Low->getValue(); + TotalCases[i] = (Hi - Lo).getLimitedValue() + 1; + if (i != 0) + TotalCases[i] += TotalCases[i - 1]; + } + + uint64_t Range = getJumpTableRange(Clusters,0, N - 1); + uint64_t NumCases = getJumpTableNumCases(TotalCases, 0, N - 1); + assert(NumCases < UINT64_MAX / 100); + assert(Range >= NumCases); // Cheap case: the whole range may be suitable for jump table. - if (TLI->isSuitableForJumpTable(SI, Stats.Cases, Stats.Targets, Stats.Range)) { + if (TLI->isSuitableForJumpTable(SI, NumCases, Range)) { CaseCluster JTCluster; if (buildJumpTable(Clusters, 0, N - 1, SI, DefaultMBB, JTCluster)) { Clusters[0] = JTCluster; @@ -108,6 +104,9 @@ void SwitchCG::SwitchLowering::findJumpTables(CaseClusterVector &Clusters, SmallVector MinPartitions(N); // LastElement[i] is the last element of the partition starting at i. SmallVector LastElement(N); + // PartitionsScore[i] is used to break ties when choosing between two + // partitionings resulting in the same number of partitions. + SmallVector PartitionsScore(N); // For PartitionsScore, a small number of comparisons is considered as good as // a jump table and a single comparison is considered better than a jump // table. @@ -117,11 +116,6 @@ void SwitchCG::SwitchLowering::findJumpTables(CaseClusterVector &Clusters, FewCases = 1, SingleCase = 2 }; - // PartitionsScore[i] is used to break ties when choosing between two - // partitionings resulting in the same number of partitions. - SmallVector PartitionsScore(N); - // PartitionsStats[j] is the stats for the partition Clusters[i..j]. - SmallVector PartitionsStats(N); // Base case: There is only one way to partition Clusters[N-1]. MinPartitions[N - 1] = 1; @@ -135,16 +129,16 @@ void SwitchCG::SwitchLowering::findJumpTables(CaseClusterVector &Clusters, MinPartitions[i] = MinPartitions[i + 1] + 1; LastElement[i] = i; PartitionsScore[i] = PartitionsScore[i + 1] + PartitionScores::SingleCase; - for (int64_t j = i + 1; j < N; j++) - PartitionsStats[j] = - getJumpTableStats(Clusters, i, j, HasReachableDefault); // Search for a solution that results in fewer partitions. for (int64_t j = N - 1; j > i; j--) { // Try building a partition from Clusters[i..j]. - if (TLI->isSuitableForJumpTable(SI, PartitionsStats[j].Cases, - PartitionsStats[j].Targets, - PartitionsStats[j].Range)) { + Range = getJumpTableRange(Clusters, i, j); + NumCases = getJumpTableNumCases(TotalCases, i, j); + assert(NumCases < UINT64_MAX / 100); + assert(Range >= NumCases); + + if (TLI->isSuitableForJumpTable(SI, NumCases, Range)) { unsigned NumPartitions = 1 + (j == N - 1 ? 0 : MinPartitions[j + 1]); unsigned Score = j == N - 1 ? 0 : PartitionsScore[j + 1]; int64_t NumEntries = j - i + 1; diff --git a/lib/CodeGen/TargetLoweringBase.cpp b/lib/CodeGen/TargetLoweringBase.cpp index 7ac5c94a154..bc005a2cc27 100644 --- a/lib/CodeGen/TargetLoweringBase.cpp +++ b/lib/CodeGen/TargetLoweringBase.cpp @@ -72,9 +72,9 @@ static cl::opt MinimumJumpTableEntries ("min-jump-table-entries", cl::init(4), cl::Hidden, cl::desc("Set minimum number of entries to use a jump table.")); -static cl::opt MaximumJumpTableTargets - ("max-jump-table-targets", cl::init(UINT_MAX), cl::Hidden, - cl::desc("Set maximum number of targets to use in a jump table.")); +static cl::opt MaximumJumpTableSize + ("max-jump-table-size", cl::init(UINT_MAX), cl::Hidden, + cl::desc("Set maximum size of jump tables.")); /// Minimum jump table density for normal functions. static cl::opt @@ -1790,18 +1790,18 @@ void TargetLoweringBase::setMinimumJumpTableEntries(unsigned Val) { MinimumJumpTableEntries = Val; } -unsigned TargetLoweringBase::getMaximumJumpTableTargets() const { - return MaximumJumpTableTargets; -} - -void TargetLoweringBase::setMaximumJumpTableTargets(unsigned Val) { - MaximumJumpTableTargets = Val; -} - unsigned TargetLoweringBase::getMinimumJumpTableDensity(bool OptForSize) const { return OptForSize ? OptsizeJumpTableDensity : JumpTableDensity; } +unsigned TargetLoweringBase::getMaximumJumpTableSize() const { + return MaximumJumpTableSize; +} + +void TargetLoweringBase::setMaximumJumpTableSize(unsigned Val) { + MaximumJumpTableSize = Val; +} + //===----------------------------------------------------------------------===// // Reciprocal Estimates //===----------------------------------------------------------------------===// diff --git a/lib/Target/AArch64/AArch64ISelLowering.cpp b/lib/Target/AArch64/AArch64ISelLowering.cpp index 9628000b477..ae09714395a 100644 --- a/lib/Target/AArch64/AArch64ISelLowering.cpp +++ b/lib/Target/AArch64/AArch64ISelLowering.cpp @@ -647,10 +647,11 @@ AArch64TargetLowering::AArch64TargetLowering(const TargetMachine &TM, setPrefFunctionAlignment( llvm::Align(1ULL << STI.getPrefFunctionLogAlignment())); - // Only change the limit for targets in a jump table if specified by + // Only change the limit for entries in a jump table if specified by // the sub target, but not at the command line. - if (getMaximumJumpTableTargets() == UINT_MAX) - setMaximumJumpTableTargets(STI.getMaximumJumpTableTargets()); + unsigned MaxJT = STI.getMaximumJumpTableSize(); + if (MaxJT && getMaximumJumpTableSize() == UINT_MAX) + setMaximumJumpTableSize(MaxJT); setHasExtractBitsInsn(true); diff --git a/lib/Target/AArch64/AArch64Subtarget.cpp b/lib/Target/AArch64/AArch64Subtarget.cpp index 085a2ec5fe0..558bea368ef 100644 --- a/lib/Target/AArch64/AArch64Subtarget.cpp +++ b/lib/Target/AArch64/AArch64Subtarget.cpp @@ -96,13 +96,13 @@ void AArch64Subtarget::initializeProperties() { break; case ExynosM1: MaxInterleaveFactor = 4; - MaxJumpTableTargets = 8; + MaxJumpTableSize = 8; PrefFunctionLogAlignment = 4; PrefLoopLogAlignment = 3; break; case ExynosM3: MaxInterleaveFactor = 4; - MaxJumpTableTargets = 20; + MaxJumpTableSize = 20; PrefFunctionLogAlignment = 5; PrefLoopLogAlignment = 4; break; diff --git a/lib/Target/AArch64/AArch64Subtarget.h b/lib/Target/AArch64/AArch64Subtarget.h index fa6e35e7c3d..757a4699986 100644 --- a/lib/Target/AArch64/AArch64Subtarget.h +++ b/lib/Target/AArch64/AArch64Subtarget.h @@ -200,7 +200,7 @@ protected: unsigned MaxPrefetchIterationsAhead = UINT_MAX; unsigned PrefFunctionLogAlignment = 0; unsigned PrefLoopLogAlignment = 0; - unsigned MaxJumpTableTargets = UINT_MAX; + unsigned MaxJumpTableSize = 0; unsigned WideningBaseCost = 0; // ReserveXRegister[i] - X#i is not available as a general purpose register. @@ -364,7 +364,7 @@ public: } unsigned getPrefLoopLogAlignment() const { return PrefLoopLogAlignment; } - unsigned getMaximumJumpTableTargets() const { return MaxJumpTableTargets; } + unsigned getMaximumJumpTableSize() const { return MaxJumpTableSize; } unsigned getWideningBaseCost() const { return WideningBaseCost; } diff --git a/test/CodeGen/AArch64/max-jump-table.ll b/test/CodeGen/AArch64/max-jump-table.ll index 7eeffce73ad..431db274325 100644 --- a/test/CodeGen/AArch64/max-jump-table.ll +++ b/test/CodeGen/AArch64/max-jump-table.ll @@ -1,9 +1,9 @@ -; RUN: llc %s -O2 -print-machineinstrs -mtriple=aarch64-linux-gnu -jump-table-density=40 -o /dev/null 2> %t; FileCheck %s --check-prefixes=CHECK,CHECK0 < %t -; RUN: llc %s -O2 -print-machineinstrs -mtriple=aarch64-linux-gnu -jump-table-density=40 -max-jump-table-targets=4 -o /dev/null 2> %t; FileCheck %s --check-prefixes=CHECK,CHECK4 < %t -; RUN: llc %s -O2 -print-machineinstrs -mtriple=aarch64-linux-gnu -jump-table-density=40 -max-jump-table-targets=8 -o /dev/null 2> %t; FileCheck %s --check-prefixes=CHECK,CHECK8 < %t -; RUN: llc %s -O2 -print-machineinstrs -mtriple=aarch64-linux-gnu -jump-table-density=40 -max-jump-table-targets=16 -o /dev/null 2> %t; FileCheck %s --check-prefixes=CHECK,CHECK16 < %t -; RUN: llc %s -O2 -print-machineinstrs -mtriple=aarch64-linux-gnu -jump-table-density=40 -mcpu=exynos-m1 -o /dev/null 2> %t; FileCheck %s --check-prefixes=CHECK,CHECKM1 < %t -; RUN: llc %s -O2 -print-machineinstrs -mtriple=aarch64-linux-gnu -jump-table-density=40 -mcpu=exynos-m3 -o /dev/null 2> %t; FileCheck %s --check-prefixes=CHECK,CHECKM3 < %t +; RUN: llc %s -O2 -print-machineinstrs -mtriple=aarch64-linux-gnu -jump-table-density=40 -o /dev/null 2> %t; FileCheck %s --check-prefixes=CHECK,CHECK0 < %t +; RUN: llc %s -O2 -print-machineinstrs -mtriple=aarch64-linux-gnu -jump-table-density=40 -max-jump-table-size=4 -o /dev/null 2> %t; FileCheck %s --check-prefixes=CHECK,CHECK4 < %t +; RUN: llc %s -O2 -print-machineinstrs -mtriple=aarch64-linux-gnu -jump-table-density=40 -max-jump-table-size=8 -o /dev/null 2> %t; FileCheck %s --check-prefixes=CHECK,CHECK8 < %t +; RUN: llc %s -O2 -print-machineinstrs -mtriple=aarch64-linux-gnu -jump-table-density=40 -max-jump-table-size=16 -o /dev/null 2> %t; FileCheck %s --check-prefixes=CHECK,CHECK16 < %t +; RUN: llc %s -O2 -print-machineinstrs -mtriple=aarch64-linux-gnu -jump-table-density=40 -mcpu=exynos-m1 -o /dev/null 2> %t; FileCheck %s --check-prefixes=CHECK,CHECKM1 < %t +; RUN: llc %s -O2 -print-machineinstrs -mtriple=aarch64-linux-gnu -jump-table-density=40 -mcpu=exynos-m3 -o /dev/null 2> %t; FileCheck %s --check-prefixes=CHECK,CHECKM3 < %t declare void @ext(i32, i32) @@ -86,11 +86,11 @@ entry: ; CHECK0-NOT: %jump-table.1: ; CHECK4-NEXT: %jump-table.0: %bb.1 %bb.2 %bb.3 %bb.4{{$}} ; CHECK4-NOT: %jump-table.1: -; CHECK8-NEXT: %jump-table.0: %bb.1 %bb.2 %bb.3 %bb.4 %bb.7 %bb.7 %bb.7 %bb.7 %bb.7 %bb.7 %bb.7 %bb.7 %bb.7 %bb.5 %bb.6{{$}} +; CHECK8-NEXT: %jump-table.0: %bb.1 %bb.2 %bb.3 %bb.4{{$}} ; CHECK8-NOT: %jump-table.1: ; CHECK16-NEXT: %jump-table.0: %bb.1 %bb.2 %bb.3 %bb.4 %bb.7 %bb.7 %bb.7 %bb.7 %bb.7 %bb.7 %bb.7 %bb.7 %bb.7 %bb.5 %bb.6{{$}} ; CHECK16-NOT: %jump-table.1: -; CHECKM1-NEXT: %jump-table.0: %bb.1 %bb.2 %bb.3 %bb.4 %bb.7 %bb.7 %bb.7 %bb.7 %bb.7 %bb.7 %bb.7 %bb.7 %bb.7 %bb.5 %bb.6{{$}} +; CHECKM1-NEXT: %jump-table.0: %bb.1 %bb.2 %bb.3 %bb.4{{$}} ; CHECKM1-NOT: %jump-table.1: ; CHECKM3-NEXT: %jump-table.0: %bb.1 %bb.2 %bb.3 %bb.4 %bb.7 %bb.7 %bb.7 %bb.7 %bb.7 %bb.7 %bb.7 %bb.7 %bb.7 %bb.5 %bb.6{{$}} ; CHECKM3-NOT: %jump-table.1: @@ -102,7 +102,6 @@ bb3: tail call void @ext(i32 4, i32 3) br label %return bb4: tail call void @ext(i32 3, i32 4) br label %return bb5: tail call void @ext(i32 2, i32 5) br label %return bb6: tail call void @ext(i32 1, i32 6) br label %return - return: ret void } @@ -132,13 +131,14 @@ entry: ; CHECK4-NEXT: %jump-table.0: %bb.1 %bb.2 %bb.3 %bb.4 ; CHECK4-NEXT: %jump-table.1: %bb.5 %bb.6 %bb.7 %bb.8 ; CHECK4-NOT: %jump-table.2: -; CHECK8-NEXT: %jump-table.0: %bb.1 %bb.2 %bb.3 %bb.4 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.5 %bb.6 %bb.7 -; CHECK8-NEXT: %jump-table.1: %bb.8 %bb.13 %bb.9 %bb.10 %bb.13 %bb.11 %bb.12 +; CHECK8-NEXT: %jump-table.0: %bb.1 %bb.2 %bb.3 %bb.4 +; CHECK8-NEXT: %jump-table.1: %bb.5 %bb.6 %bb.7 %bb.8 %bb.13 %bb.9 %bb.10 ; CHECK8-NOT: %jump-table.2: -; CHECK16-NEXT: %jump-table.0: %bb.1 %bb.2 %bb.3 %bb.4 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.5 %bb.6 %bb.7 %bb.8 %bb.13 %bb.9 %bb.10 %bb.13 %bb.11 %bb.12 -; CHECK16-NOT: %jump-table.1: -; CHECKM1-NEXT: %jump-table.0: %bb.1 %bb.2 %bb.3 %bb.4 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.5 %bb.6 %bb.7 -; CHECKM1-NEXT: %jump-table.1: %bb.8 %bb.13 %bb.9 %bb.10 %bb.13 %bb.11 %bb.12 +; CHECK16-NEXT: %jump-table.0: %bb.1 %bb.2 %bb.3 %bb.4 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.5 %bb.6 %bb.7 +; CHECK16-NEXT: %jump-table.1: %bb.8 %bb.13 %bb.9 %bb.10 %bb.13 %bb.11 %bb.12 +; CHECK16-NOT: %jump-table.2: +; CHECKM1-NEXT: %jump-table.0: %bb.1 %bb.2 %bb.3 %bb.4 +; CHECKM1-NEXT: %jump-table.1: %bb.5 %bb.6 %bb.7 %bb.8 %bb.13 %bb.9 %bb.10 ; CHECKM1-NOT: %jump-table.2: ; CHECKM3-NEXT: %jump-table.0: %bb.1 %bb.2 %bb.3 %bb.4 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.5 %bb.6 %bb.7 %bb.8 %bb.13 %bb.9 %bb.10 ; CHECKM3-NOT: %jump-table.1: @@ -185,15 +185,15 @@ entry: ; CHECK0-NOT: %jump-table.1: ; CHECK4-NEXT: %jump-table.0: %bb.1 %bb.2 %bb.3 %bb.4 ; CHECK4-NEXT: %jump-table.1: %bb.5 %bb.6 %bb.7 %bb.8 -; CHECK4-NEXT: %jump-table.2: %bb.9 %bb.10 %bb.13 %bb.11 %bb.12 -; CHECK4-NOT: %jump-table.3: -; CHECK8-NEXT: %jump-table.0: %bb.1 %bb.2 %bb.3 %bb.4 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.5 %bb.6 %bb.7 %bb.8 -; CHECK8-NEXT: %jump-table.1: %bb.9 %bb.10 %bb.13 %bb.11 %bb.12 +; CHECK4-NOT: %jump-table.2: +; CHECK8-NEXT: %jump-table.0: %bb.1 %bb.2 %bb.3 %bb.4 +; CHECK8-NEXT: %jump-table.1: %bb.5 %bb.6 %bb.7 %bb.8 %bb.13 %bb.9 %bb.10 ; CHECK8-NOT: %jump-table.2: -; CHECK16-NEXT: %jump-table.0: %bb.1 %bb.2 %bb.3 %bb.4 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.5 %bb.6 %bb.7 %bb.8 %bb.13 %bb.9 %bb.10 %bb.13 %bb.11 %bb.12 -; CHECK16-NOT: %jump-table.1: -; CHECKM1-NEXT: %jump-table.0: %bb.1 %bb.2 %bb.3 %bb.4 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.5 %bb.6 %bb.7 %bb.8 -; CHECKM1-NEXT: %jump-table.1: %bb.9 %bb.10 %bb.13 %bb.11 %bb.12 +; CHECK16-NEXT: %jump-table.0: %bb.1 %bb.2 %bb.3 %bb.4 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.5 %bb.6 %bb.7 +; CHECK16-NEXT: %jump-table.1: %bb.8 %bb.13 %bb.9 %bb.10 %bb.13 %bb.11 %bb.12 +; CHECK16-NOT: %jump-table.2: +; CHECKM1-NEXT: %jump-table.0: %bb.1 %bb.2 %bb.3 %bb.4 +; CHECKM1-NEXT: %jump-table.1: %bb.5 %bb.6 %bb.7 %bb.8 %bb.13 %bb.9 %bb.10 ; CHECKM1-NOT: %jump-table.2: ; CHECKM3-NEXT: %jump-table.0: %bb.1 %bb.2 %bb.3 %bb.4 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.13 %bb.5 %bb.6 %bb.7 %bb.8 %bb.13 %bb.9 %bb.10 ; CHECKM3-NOT: %jump-table.1: