1 ; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep switch
3 int %test1() { ; Test normal folding
4 switch uint 5, label %Default [
17 int %test2() { ; Test folding to default dest
18 switch uint 3, label %Default [
22 uint 5, label %TheDest
31 int %test3(bool %C) { ; Test folding all to same dest
32 br bool %C, label %Start, label %TheDest
34 switch uint 3, label %TheDest [
35 uint 0, label %TheDest
36 uint 1, label %TheDest
37 uint 2, label %TheDest
38 uint 5, label %TheDest
43 int %test4(uint %C) { ; Test folding switch -> branch
44 switch uint %C, label %L1 [
52 switch uint %C, label %L1 [ ; Can fold into a cond branch!