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 3 4; FIXME: RenamedOp should be %cmp or %x in all cases here, 5; which is the value used in the condition. 6define i32 @test(i32 %x) { 7; CHECK-LABEL: @test( 8; CHECK-NEXT: entry: 9; CHECK-NEXT: br label [[BB1:%.*]] 10; CHECK: 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:%.*]] 17; CHECK: bb2: 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:%.*]] 25; CHECK: bb3: 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:%.*]] 31; CHECK: exit1: 32; CHECK-NEXT: ret i32 0 33; CHECK: exit2: 34; CHECK-NEXT: ret i32 [[X_0_4]] 35; CHECK: exit3: 36; CHECK-NEXT: ret i32 [[X_0_1_2]] 37; CHECK: exit4: 38; CHECK-NEXT: ret i32 [[X_0_1_3]] 39; 40entry: 41 br label %bb1 42 43bb1: 44 %cmp = icmp eq i32 %x, 0 45 br i1 %cmp, label %bb2, label %exit1 46 47bb2: 48 br i1 %cmp, label %bb3, label %exit2 49 50bb3: 51 br i1 %cmp, label %exit3, label %exit4 52 53exit1: 54 ret i32 0 55 56exit2: 57 ret i32 %x 58 59exit3: 60 ret i32 %x 61 62exit4: 63 ret i32 %x 64} 65