| ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py |
| ; RUN: opt < %s -simplifycfg -S | FileCheck %s |
| ; RUN: opt < %s -passes=simplifycfg -S | FileCheck %s |
| ; FIXME: We can replace %phi with true. |
| define void @test_01(i1 %cond) { |
| ; CHECK-NEXT: [[DOT:%.*]] = select i1 [[COND:%.*]], i1 true, i1 undef |
| ; CHECK-NEXT: br i1 [[DOT]], label [[RET_1:%.*]], label [[COMMON_RET:%.*]] |
| ; CHECK-NEXT: call void @foo() |
| ; CHECK-NEXT: br label [[COMMON_RET]] |
| br i1 %cond, label %if.true, label %if.false |
| %phi = phi i1 [true, %if.true], [undef, %if.false] |
| br i1 %phi, label %ret_1, label %ret_2 |