Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / bolt / test / Inputs / icf-jump-tables.c
blob52b61ab0c034967f6eae75757ffbedacdcbba511
1 #include "stub.h"
3 int inc(int x) {
4 switch (x) {
5 case 0: puts("0"); return 1;
6 case 1: puts("1"); return 2;
7 case 2: puts("2"); return 3;
8 case 3: puts("3"); return 4;
9 case 4: puts("4"); return 5;
10 case 5: puts("5"); return 6;
11 default: return x + 1;
15 int inc_dup(int x) {
16 switch (x) {
17 case 0: puts("0"); return 1;
18 case 1: puts("1"); return 2;
19 case 2: puts("2"); return 3;
20 case 3: puts("3"); return 4;
21 case 4: puts("4"); return 5;
22 case 5: puts("5"); return 6;
23 default: return x + 1;
27 int main() {
28 return inc(5) - 2*inc_dup(2);