1 ; RUN: opt -S <%s -simplifycfg | FileCheck %s
3 define void @test_br(i32 %x) {
5 ; CHECK-LABEL: @test_br(
8 %cmp = icmp eq i32 %x, 10
9 br i1 %cmp, label %if.then, label %if.then
11 if.then: ; preds = %entry
14 if.end: ; preds = %if.else, %if.then
18 define void @test_switch(i32 %x) nounwind {
20 ; CHECK-LABEL: @test_switch(
22 ; CHECK-NEXT: ret void
24 switch i32 %rem, label %sw.bb [
29 sw.bb: ; preds = %sw.default, %entry, %entry
32 sw.epilog: ; preds = %sw.bb
36 define void @test_indirectbr(i32 %x) {
38 ; CHECK-LABEL: @test_indirectbr(
40 ; CHECK-NEXT: ret void
42 %label = bitcast i8* blockaddress(@test_indirectbr, %L1) to i8*
43 indirectbr i8* %label, [label %L1, label %L2]