1; Test CFG simplify removal of branch instructions. 2; 3; RUN: opt < %s -simplifycfg -S | FileCheck %s 4 5define void @test1() { 6 br label %1 7 ret void 8; CHECK: @test1 9; CHECK-NEXT: ret void 10} 11 12define void @test2() { 13 ret void 14 ret void 15; CHECK: @test2 16; CHECK-NEXT: ret void 17; CHECK-NEXT: } 18} 19 20define void @test3(i1 %T) { 21 br i1 %T, label %1, label %1 22 ret void 23; CHECK: @test3 24; CHECK-NEXT: ret void 25} 26 27 28; PR5795 29define void @test5(i32 %A) { 30 switch i32 %A, label %return [ 31 i32 2, label %1 32 i32 10, label %2 33 ] 34 35 ret void 36 37 ret void 38 39return: ; preds = %entry 40 ret void 41; CHECK: @test5 42; CHECK-NEXT: ret void 43} 44