1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -simplifycfg -S | FileCheck %s
3 ; RUN: opt < %s -passes=simplifycfg -S | FileCheck %s
7 ; FIXME: We can replace %phi with true.
8 define void @test_01(i1 %cond) {
9 ; CHECK-LABEL: @test_01(
11 ; CHECK-NEXT: [[DOT:%.*]] = select i1 [[COND:%.*]], i1 true, i1 undef
12 ; CHECK-NEXT: br i1 [[DOT]], label [[RET_1:%.*]], label [[COMMON_RET:%.*]]
14 ; CHECK-NEXT: ret void
16 ; CHECK-NEXT: call void @foo()
17 ; CHECK-NEXT: br label [[COMMON_RET]]
20 br i1 %cond, label %if.true, label %if.false
29 %phi = phi i1 [true, %if.true], [undef, %if.false]
30 br i1 %phi, label %ret_1, label %ret_2