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