llvm.org GIT mirror llvm / 74b5b19
SelectionDAG switch lowering: use 'unsigned' to count destination popularity SwitchInst::getNumCases() returns unsinged, so using uint64_t to count cases seems unnecessary. Also fix a missing CHECK in the test case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224393 91177308-0d34-0410-b5e6-96231b3b80d8 Hans Wennborg 5 years ago
2 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
27112711 !Cases.empty()) {
27122712 // Replace an unreachable default destination with the most popular case
27132713 // destination.
2714 DenseMap Popularity;
2715 uint64_t MaxPop = 0;
2714 DenseMap Popularity;
2715 unsigned MaxPop = 0;
27162716 const BasicBlock *MaxBB = nullptr;
27172717 for (auto I : SI.cases()) {
27182718 const BasicBlock *BB = I.getCaseSuccessor();
55 define void @sum2(i32 %x, i32* %to) {
66 ; CHECK-LABEL: sum2:
77 ; CHECK: movl 4(%esp), [[REG:%e[a-z]{2}]]
8 ; cmpl $3, [[REG]]
8 ; CHECK: cmpl $3, [[REG]]
99 ; CHECK: jbe .LBB0_1
1010 ; CHECK: movl $4
1111 ; CHECK: retl