1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -S -print-predicateinfo < %s 2>&1 >/dev/null | FileCheck %s
4 ; FIXME: RenamedOp should be %cmp or %x in all cases here,
5 ; which is the value used in the condition.
6 define i32 @test(i32 %x) {
9 ; CHECK-NEXT: br label [[BB1:%.*]]
11 ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32 [[X:%.*]], 0
12 ; CHECK: RenamedOp: [[CMP]]
13 ; CHECK: [[CMP_0:%.*]] = call i1 @llvm.ssa.copy.{{.*}}(i1 [[CMP]])
14 ; CHECK: RenamedOp: [[X]]
15 ; CHECK: [[X_0:%.*]] = call i32 @llvm.ssa.copy.{{.*}}(i32 [[X]])
16 ; CHECK-NEXT: br i1 [[CMP]], label [[BB2:%.*]], label [[EXIT1:%.*]]
18 ; CHECK: RenamedOp: [[CMP_0]]
19 ; CHECK: [[CMP_0_1:%.*]] = call i1 @llvm.ssa.copy.{{.*}}(i1 [[CMP_0]])
20 ; CHECK: RenamedOp: [[X]]
21 ; CHECK: [[X_0_1:%.*]] = call i32 @llvm.ssa.copy.{{.*}}(i32 [[X_0]])
22 ; CHECK: RenamedOp: [[X_0]]
23 ; CHECK: [[X_0_4:%.*]] = call i32 @llvm.ssa.copy.{{.*}}(i32 [[X_0]])
24 ; CHECK-NEXT: br i1 [[CMP_0]], label [[BB3:%.*]], label [[EXIT2:%.*]]
26 ; CHECK: RenamedOp: [[X]]
27 ; CHECK: [[X_0_1_2:%.*]] = call i32 @llvm.ssa.copy.{{.*}}(i32 [[X_0_1]])
28 ; CHECK: RenamedOp: [[X_0_1]]
29 ; CHECK: [[X_0_1_3:%.*]] = call i32 @llvm.ssa.copy.{{.*}}(i32 [[X_0_1]])
30 ; CHECK-NEXT: br i1 [[CMP_0_1]], label [[EXIT3:%.*]], label [[EXIT4:%.*]]
32 ; CHECK-NEXT: ret i32 0
34 ; CHECK-NEXT: ret i32 [[X_0_4]]
36 ; CHECK-NEXT: ret i32 [[X_0_1_2]]
38 ; CHECK-NEXT: ret i32 [[X_0_1_3]]
44 %cmp = icmp eq i32 %x, 0
45 br i1 %cmp, label %bb2, label %exit1
48 br i1 %cmp, label %bb3, label %exit2
51 br i1 %cmp, label %exit3, label %exit4