|
| 1 | +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals all --version 6 |
1 | 2 | ; RUN: opt < %s -passes=instcombine -S | FileCheck %s |
2 | 3 |
|
3 | | -; CHECK: define i32 @LHSBin(i1 %C) !prof ![[PROF0:[0-9]]] |
4 | | -; CHECK: %V = select i1 %C, i32 1010, i32 20, !prof ![[PROF1:[0-9]]] |
5 | 4 | define i32 @LHSBin(i1 %C) !prof !0 { |
| 5 | +; CHECK-LABEL: define i32 @LHSBin( |
| 6 | +; CHECK-SAME: i1 [[C:%.*]]) !prof [[PROF0:![0-9]+]] { |
| 7 | +; CHECK-NEXT: [[V:%.*]] = select i1 [[C]], i32 1010, i32 20, !prof [[PROF1:![0-9]+]] |
| 8 | +; CHECK-NEXT: ret i32 [[V]] |
| 9 | +; |
6 | 10 | %A = select i1 %C, i32 1000, i32 10, !prof !1 |
7 | 11 | %V = add i32 %A, 10 |
8 | 12 | ret i32 %V |
9 | 13 | } |
10 | 14 |
|
11 | | -; CHECK: define i32 @RHSBin(i1 %C) !prof ![[PROF0]] |
12 | | -; CHECK: %V = select i1 %C, i32 1010, i32 20, !prof ![[PROF1]] |
13 | 15 | define i32 @RHSBin(i1 %C) !prof !0 { |
| 16 | +; CHECK-LABEL: define i32 @RHSBin( |
| 17 | +; CHECK-SAME: i1 [[C:%.*]]) !prof [[PROF0]] { |
| 18 | +; CHECK-NEXT: [[V:%.*]] = select i1 [[C]], i32 1010, i32 20, !prof [[PROF1]] |
| 19 | +; CHECK-NEXT: ret i32 [[V]] |
| 20 | +; |
14 | 21 | %A = select i1 %C, i32 1000, i32 10, !prof !1 |
15 | 22 | %V = add i32 10, %A |
16 | 23 | ret i32 %V; |
17 | 24 | } |
18 | 25 |
|
19 | | -; CHECK: define i32 @BothBin(i1 %C) !prof ![[PROF0]] |
20 | | -; CHECK: %V = select i1 %C, i32 2000, i32 20, !prof ![[PROF1]] |
21 | 26 | define i32 @BothBin(i1 %C) !prof !0 { |
| 27 | +; CHECK-LABEL: define i32 @BothBin( |
| 28 | +; CHECK-SAME: i1 [[C:%.*]]) !prof [[PROF0]] { |
| 29 | +; CHECK-NEXT: [[V:%.*]] = select i1 [[C]], i32 2000, i32 20, !prof [[PROF1]] |
| 30 | +; CHECK-NEXT: ret i32 [[V]] |
| 31 | +; |
22 | 32 | %A = select i1 %C, i32 1000, i32 10, !prof !1 |
23 | 33 | %B = select i1 %C, i32 1000, i32 10, !prof !1 |
24 | 34 | %V = add i32 %A, %B |
25 | 35 | ret i32 %V; |
26 | 36 | } |
27 | 37 |
|
28 | | -; CHECK: define i32 @NegBin(i1 %C) !prof ![[PROF0]] |
29 | | -; CHECK: %V = select i1 %C, i32 1010, i32 0, !prof ![[PROF1]] |
30 | 38 | define i32 @NegBin(i1 %C) !prof !0 { |
| 39 | +; CHECK-LABEL: define i32 @NegBin( |
| 40 | +; CHECK-SAME: i1 [[C:%.*]]) !prof [[PROF0]] { |
| 41 | +; CHECK-NEXT: [[V:%.*]] = select i1 [[C]], i32 1010, i32 0, !prof [[PROF1]] |
| 42 | +; CHECK-NEXT: ret i32 [[V]] |
| 43 | +; |
31 | 44 | %A = select i1 %C, i32 1000, i32 -10, !prof !1 |
32 | 45 | %V = add i32 %A, 10 |
33 | 46 | ret i32 %V |
34 | 47 | } |
35 | 48 |
|
36 | | -; CHECK: ![[PROF0]] = !{!"function_entry_count", i64 1000} |
37 | | -; CHECK: ![[PROF1]] = !{!"branch_weights", i32 2, i32 3} |
38 | 49 | !0 = !{!"function_entry_count", i64 1000} |
39 | 50 | !1 = !{!"branch_weights", i32 2, i32 3} |
| 51 | +;. |
| 52 | +; CHECK: [[PROF0]] = !{!"function_entry_count", i64 1000} |
| 53 | +; CHECK: [[PROF1]] = !{!"branch_weights", i32 2, i32 3} |
| 54 | +;. |
0 commit comments