Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 1 | ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py |
| 2 | ; RUN: opt < %s -cost-model -analyze -cost-kind=code-size -mtriple=thumbv8m.base | FileCheck %s --check-prefix=CHECK-T1-SIZE |
| 3 | ; RUN: opt < %s -cost-model -analyze -cost-kind=code-size -mtriple=thumbv8m.main | FileCheck %s --check-prefix=CHECK-V8M-SIZE |
Sam Parker | f2675ab | 2020-08-05 09:37:53 +0100 | [diff] [blame] | 4 | ; RUN: opt < %s -cost-model -analyze -cost-kind=code-size -mtriple=thumbv8.1m.main -mattr=+mve | FileCheck %s --check-prefix=CHECK-MVE-SIZE |
| 5 | ; RUN: opt < %s -cost-model -analyze -cost-kind=code-size -mtriple=armv8a -mattr=+neon | FileCheck %s --check-prefix=CHECK-NEON-SIZE |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 6 | ; RUN: opt < %s -cost-model -analyze -cost-kind=latency -mtriple=thumbv8m.base | FileCheck %s --check-prefix=CHECK-T1-LATENCY |
| 7 | ; RUN: opt < %s -cost-model -analyze -cost-kind=latency -mtriple=thumbv8m.main | FileCheck %s --check-prefix=CHECK-V8M-LATENCY |
| 8 | ; RUN: opt < %s -cost-model -analyze -cost-kind=latency -mtriple=thumbv8.1m.main | FileCheck %s --check-prefix=CHECK-V8_1M-LATENCY |
| 9 | ; RUN: opt < %s -cost-model -analyze -cost-kind=throughput -mtriple=thumbv8m.base | FileCheck %s --check-prefix=CHECK-T1-THROUGHPUT |
| 10 | ; RUN: opt < %s -cost-model -analyze -cost-kind=throughput -mtriple=thumbv8m.main | FileCheck %s --check-prefix=CHECK-V8M-THROUGHPUT |
| 11 | ; RUN: opt < %s -cost-model -analyze -cost-kind=throughput -mtriple=thumbv8.1m.main | FileCheck %s --check-prefix=CHECK-V8_1M-THROUGHPUT |
Sam Parker | f2675ab | 2020-08-05 09:37:53 +0100 | [diff] [blame] | 12 | ; RUN: opt < %s -cost-model -analyze -cost-kind=throughput -mtriple=thumbv8.1m.main -mattr=+mve | FileCheck %s --check-prefix=CHECK-MVE-THROUGHPUT |
| 13 | ; RUN: opt < %s -cost-model -analyze -cost-kind=throughput -mtriple=armv8a -mattr=+neon | FileCheck %s --check-prefix=CHECK-NEON-THROUGHPUT |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 14 | |
| 15 | define i32 @simple_loop_cost(i32 %N) { |
| 16 | ; CHECK-T1-SIZE-LABEL: 'simple_loop_cost' |
| 17 | ; CHECK-T1-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 |
| 18 | ; CHECK-T1-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %zero, label %exit, label %preheader |
| 19 | ; CHECK-T1-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %loop |
| 20 | ; CHECK-T1-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] |
| 21 | ; CHECK-T1-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 |
| 22 | ; CHECK-T1-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N |
| 23 | ; CHECK-T1-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %cmp, label %loop, label %exit |
| 24 | ; CHECK-T1-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] |
| 25 | ; CHECK-T1-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %res |
| 26 | ; |
| 27 | ; CHECK-V8M-SIZE-LABEL: 'simple_loop_cost' |
| 28 | ; CHECK-V8M-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 |
| 29 | ; CHECK-V8M-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %zero, label %exit, label %preheader |
| 30 | ; CHECK-V8M-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %loop |
| 31 | ; CHECK-V8M-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] |
| 32 | ; CHECK-V8M-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 |
| 33 | ; CHECK-V8M-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N |
| 34 | ; CHECK-V8M-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %cmp, label %loop, label %exit |
| 35 | ; CHECK-V8M-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] |
| 36 | ; CHECK-V8M-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %res |
| 37 | ; |
Sam Parker | f2675ab | 2020-08-05 09:37:53 +0100 | [diff] [blame] | 38 | ; CHECK-MVE-SIZE-LABEL: 'simple_loop_cost' |
| 39 | ; CHECK-MVE-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 |
| 40 | ; CHECK-MVE-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %zero, label %exit, label %preheader |
| 41 | ; CHECK-MVE-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %loop |
| 42 | ; CHECK-MVE-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] |
| 43 | ; CHECK-MVE-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 |
| 44 | ; CHECK-MVE-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N |
| 45 | ; CHECK-MVE-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %cmp, label %loop, label %exit |
| 46 | ; CHECK-MVE-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] |
| 47 | ; CHECK-MVE-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %res |
| 48 | ; |
| 49 | ; CHECK-NEON-SIZE-LABEL: 'simple_loop_cost' |
| 50 | ; CHECK-NEON-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 |
| 51 | ; CHECK-NEON-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %zero, label %exit, label %preheader |
| 52 | ; CHECK-NEON-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %loop |
| 53 | ; CHECK-NEON-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] |
| 54 | ; CHECK-NEON-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 |
| 55 | ; CHECK-NEON-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N |
| 56 | ; CHECK-NEON-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %cmp, label %loop, label %exit |
| 57 | ; CHECK-NEON-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] |
| 58 | ; CHECK-NEON-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %res |
| 59 | ; |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 60 | ; CHECK-T1-LATENCY-LABEL: 'simple_loop_cost' |
| 61 | ; CHECK-T1-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 |
| 62 | ; CHECK-T1-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %zero, label %exit, label %preheader |
| 63 | ; CHECK-T1-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %loop |
| 64 | ; CHECK-T1-LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] |
| 65 | ; CHECK-T1-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 |
| 66 | ; CHECK-T1-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N |
| 67 | ; CHECK-T1-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %cmp, label %loop, label %exit |
| 68 | ; CHECK-T1-LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] |
| 69 | ; CHECK-T1-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %res |
| 70 | ; |
| 71 | ; CHECK-V8M-LATENCY-LABEL: 'simple_loop_cost' |
| 72 | ; CHECK-V8M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 |
| 73 | ; CHECK-V8M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %zero, label %exit, label %preheader |
| 74 | ; CHECK-V8M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %loop |
| 75 | ; CHECK-V8M-LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] |
| 76 | ; CHECK-V8M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 |
| 77 | ; CHECK-V8M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N |
| 78 | ; CHECK-V8M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %cmp, label %loop, label %exit |
| 79 | ; CHECK-V8M-LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] |
| 80 | ; CHECK-V8M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %res |
| 81 | ; |
| 82 | ; CHECK-V8_1M-LATENCY-LABEL: 'simple_loop_cost' |
| 83 | ; CHECK-V8_1M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 |
| 84 | ; CHECK-V8_1M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %zero, label %exit, label %preheader |
| 85 | ; CHECK-V8_1M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %loop |
| 86 | ; CHECK-V8_1M-LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] |
| 87 | ; CHECK-V8_1M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 |
| 88 | ; CHECK-V8_1M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N |
| 89 | ; CHECK-V8_1M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %cmp, label %loop, label %exit |
| 90 | ; CHECK-V8_1M-LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] |
| 91 | ; CHECK-V8_1M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %res |
| 92 | ; |
| 93 | ; CHECK-T1-THROUGHPUT-LABEL: 'simple_loop_cost' |
| 94 | ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 |
Sam Parker | 2596da3 | 2020-06-15 08:58:25 +0100 | [diff] [blame] | 95 | ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %zero, label %exit, label %preheader |
| 96 | ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %loop |
| 97 | ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 98 | ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 |
| 99 | ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N |
Sam Parker | 2596da3 | 2020-06-15 08:58:25 +0100 | [diff] [blame] | 100 | ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %cmp, label %loop, label %exit |
| 101 | ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] |
| 102 | ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %res |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 103 | ; |
| 104 | ; CHECK-V8M-THROUGHPUT-LABEL: 'simple_loop_cost' |
| 105 | ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 |
Sam Parker | 2596da3 | 2020-06-15 08:58:25 +0100 | [diff] [blame] | 106 | ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %zero, label %exit, label %preheader |
| 107 | ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %loop |
| 108 | ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 109 | ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 |
| 110 | ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N |
Sam Parker | 2596da3 | 2020-06-15 08:58:25 +0100 | [diff] [blame] | 111 | ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %cmp, label %loop, label %exit |
| 112 | ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] |
| 113 | ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %res |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 114 | ; |
| 115 | ; CHECK-V8_1M-THROUGHPUT-LABEL: 'simple_loop_cost' |
| 116 | ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 |
Sam Parker | 2596da3 | 2020-06-15 08:58:25 +0100 | [diff] [blame] | 117 | ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %zero, label %exit, label %preheader |
| 118 | ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %loop |
| 119 | ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 120 | ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 |
| 121 | ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N |
Sam Parker | 2596da3 | 2020-06-15 08:58:25 +0100 | [diff] [blame] | 122 | ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %cmp, label %loop, label %exit |
| 123 | ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] |
| 124 | ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %res |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 125 | ; |
Sam Parker | f2675ab | 2020-08-05 09:37:53 +0100 | [diff] [blame] | 126 | ; CHECK-MVE-THROUGHPUT-LABEL: 'simple_loop_cost' |
| 127 | ; CHECK-MVE-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 |
| 128 | ; CHECK-MVE-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %zero, label %exit, label %preheader |
| 129 | ; CHECK-MVE-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %loop |
| 130 | ; CHECK-MVE-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] |
| 131 | ; CHECK-MVE-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 |
| 132 | ; CHECK-MVE-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N |
| 133 | ; CHECK-MVE-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %cmp, label %loop, label %exit |
| 134 | ; CHECK-MVE-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] |
| 135 | ; CHECK-MVE-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %res |
| 136 | ; |
| 137 | ; CHECK-NEON-THROUGHPUT-LABEL: 'simple_loop_cost' |
| 138 | ; CHECK-NEON-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 |
| 139 | ; CHECK-NEON-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %zero, label %exit, label %preheader |
| 140 | ; CHECK-NEON-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %loop |
| 141 | ; CHECK-NEON-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] |
| 142 | ; CHECK-NEON-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 |
| 143 | ; CHECK-NEON-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N |
| 144 | ; CHECK-NEON-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %cmp, label %loop, label %exit |
| 145 | ; CHECK-NEON-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] |
| 146 | ; CHECK-NEON-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %res |
| 147 | ; |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 148 | entry: |
| 149 | %zero = icmp eq i32 %N, 0 |
| 150 | br i1 %zero, label %exit, label %preheader |
| 151 | |
| 152 | preheader: |
| 153 | br label %loop |
| 154 | |
| 155 | loop: |
| 156 | %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] |
| 157 | %iv.next = add nuw i32 %iv, 1 |
| 158 | %cmp = icmp ne i32 %iv.next, %N |
| 159 | br i1 %cmp, label %loop, label %exit |
| 160 | |
| 161 | exit: |
| 162 | %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] |
| 163 | ret i32 %res |
| 164 | } |
| 165 | |
| 166 | define i32 @simple_mul_loop(i32* %A, i32* %B, i32 %N) { |
| 167 | ; CHECK-T1-SIZE-LABEL: 'simple_mul_loop' |
| 168 | ; CHECK-T1-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 |
| 169 | ; CHECK-T1-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %zero, label %exit, label %preheader |
| 170 | ; CHECK-T1-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %loop |
| 171 | ; CHECK-T1-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] |
| 172 | ; CHECK-T1-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %addr.a = getelementptr i32, i32* %A, i32 %iv |
Sam Parker | f2675ab | 2020-08-05 09:37:53 +0100 | [diff] [blame] | 173 | ; CHECK-T1-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load = load i32, i32* %addr.a, align 4 |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 174 | ; CHECK-T1-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %mul = mul i32 %load, %load |
| 175 | ; CHECK-T1-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %addr.b = getelementptr i32, i32* %B, i32 %iv |
Sam Parker | f2675ab | 2020-08-05 09:37:53 +0100 | [diff] [blame] | 176 | ; CHECK-T1-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %mul, i32* %addr.b, align 4 |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 177 | ; CHECK-T1-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 |
| 178 | ; CHECK-T1-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N |
| 179 | ; CHECK-T1-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %cmp, label %loop, label %exit |
| 180 | ; CHECK-T1-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] |
| 181 | ; CHECK-T1-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %res |
| 182 | ; |
| 183 | ; CHECK-V8M-SIZE-LABEL: 'simple_mul_loop' |
| 184 | ; CHECK-V8M-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 |
| 185 | ; CHECK-V8M-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %zero, label %exit, label %preheader |
| 186 | ; CHECK-V8M-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %loop |
| 187 | ; CHECK-V8M-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] |
| 188 | ; CHECK-V8M-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.a = getelementptr i32, i32* %A, i32 %iv |
Sam Parker | f2675ab | 2020-08-05 09:37:53 +0100 | [diff] [blame] | 189 | ; CHECK-V8M-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load = load i32, i32* %addr.a, align 4 |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 190 | ; CHECK-V8M-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %mul = mul i32 %load, %load |
| 191 | ; CHECK-V8M-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.b = getelementptr i32, i32* %B, i32 %iv |
Sam Parker | f2675ab | 2020-08-05 09:37:53 +0100 | [diff] [blame] | 192 | ; CHECK-V8M-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %mul, i32* %addr.b, align 4 |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 193 | ; CHECK-V8M-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 |
| 194 | ; CHECK-V8M-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N |
| 195 | ; CHECK-V8M-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %cmp, label %loop, label %exit |
| 196 | ; CHECK-V8M-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] |
| 197 | ; CHECK-V8M-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %res |
| 198 | ; |
Sam Parker | f2675ab | 2020-08-05 09:37:53 +0100 | [diff] [blame] | 199 | ; CHECK-MVE-SIZE-LABEL: 'simple_mul_loop' |
| 200 | ; CHECK-MVE-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 |
| 201 | ; CHECK-MVE-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %zero, label %exit, label %preheader |
| 202 | ; CHECK-MVE-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %loop |
| 203 | ; CHECK-MVE-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] |
| 204 | ; CHECK-MVE-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.a = getelementptr i32, i32* %A, i32 %iv |
| 205 | ; CHECK-MVE-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load = load i32, i32* %addr.a, align 4 |
| 206 | ; CHECK-MVE-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %mul = mul i32 %load, %load |
| 207 | ; CHECK-MVE-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.b = getelementptr i32, i32* %B, i32 %iv |
| 208 | ; CHECK-MVE-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %mul, i32* %addr.b, align 4 |
| 209 | ; CHECK-MVE-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 |
| 210 | ; CHECK-MVE-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N |
| 211 | ; CHECK-MVE-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %cmp, label %loop, label %exit |
| 212 | ; CHECK-MVE-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] |
| 213 | ; CHECK-MVE-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %res |
| 214 | ; |
| 215 | ; CHECK-NEON-SIZE-LABEL: 'simple_mul_loop' |
| 216 | ; CHECK-NEON-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 |
| 217 | ; CHECK-NEON-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %zero, label %exit, label %preheader |
| 218 | ; CHECK-NEON-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %loop |
| 219 | ; CHECK-NEON-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] |
| 220 | ; CHECK-NEON-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.a = getelementptr i32, i32* %A, i32 %iv |
| 221 | ; CHECK-NEON-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load = load i32, i32* %addr.a, align 4 |
| 222 | ; CHECK-NEON-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %mul = mul i32 %load, %load |
| 223 | ; CHECK-NEON-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.b = getelementptr i32, i32* %B, i32 %iv |
| 224 | ; CHECK-NEON-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %mul, i32* %addr.b, align 4 |
| 225 | ; CHECK-NEON-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 |
| 226 | ; CHECK-NEON-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N |
| 227 | ; CHECK-NEON-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %cmp, label %loop, label %exit |
| 228 | ; CHECK-NEON-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] |
| 229 | ; CHECK-NEON-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %res |
| 230 | ; |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 231 | ; CHECK-T1-LATENCY-LABEL: 'simple_mul_loop' |
| 232 | ; CHECK-T1-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 |
| 233 | ; CHECK-T1-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %zero, label %exit, label %preheader |
| 234 | ; CHECK-T1-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %loop |
| 235 | ; CHECK-T1-LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] |
| 236 | ; CHECK-T1-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %addr.a = getelementptr i32, i32* %A, i32 %iv |
Sam Parker | f2675ab | 2020-08-05 09:37:53 +0100 | [diff] [blame] | 237 | ; CHECK-T1-LATENCY-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %load = load i32, i32* %addr.a, align 4 |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 238 | ; CHECK-T1-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %mul = mul i32 %load, %load |
| 239 | ; CHECK-T1-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %addr.b = getelementptr i32, i32* %B, i32 %iv |
Sam Parker | f2675ab | 2020-08-05 09:37:53 +0100 | [diff] [blame] | 240 | ; CHECK-T1-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %mul, i32* %addr.b, align 4 |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 241 | ; CHECK-T1-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 |
| 242 | ; CHECK-T1-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N |
| 243 | ; CHECK-T1-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %cmp, label %loop, label %exit |
| 244 | ; CHECK-T1-LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] |
| 245 | ; CHECK-T1-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %res |
| 246 | ; |
| 247 | ; CHECK-V8M-LATENCY-LABEL: 'simple_mul_loop' |
| 248 | ; CHECK-V8M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 |
| 249 | ; CHECK-V8M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %zero, label %exit, label %preheader |
| 250 | ; CHECK-V8M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %loop |
| 251 | ; CHECK-V8M-LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] |
| 252 | ; CHECK-V8M-LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.a = getelementptr i32, i32* %A, i32 %iv |
Sam Parker | f2675ab | 2020-08-05 09:37:53 +0100 | [diff] [blame] | 253 | ; CHECK-V8M-LATENCY-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %load = load i32, i32* %addr.a, align 4 |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 254 | ; CHECK-V8M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %mul = mul i32 %load, %load |
| 255 | ; CHECK-V8M-LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.b = getelementptr i32, i32* %B, i32 %iv |
Sam Parker | f2675ab | 2020-08-05 09:37:53 +0100 | [diff] [blame] | 256 | ; CHECK-V8M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %mul, i32* %addr.b, align 4 |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 257 | ; CHECK-V8M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 |
| 258 | ; CHECK-V8M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N |
| 259 | ; CHECK-V8M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %cmp, label %loop, label %exit |
| 260 | ; CHECK-V8M-LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] |
| 261 | ; CHECK-V8M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %res |
| 262 | ; |
| 263 | ; CHECK-V8_1M-LATENCY-LABEL: 'simple_mul_loop' |
| 264 | ; CHECK-V8_1M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 |
| 265 | ; CHECK-V8_1M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %zero, label %exit, label %preheader |
| 266 | ; CHECK-V8_1M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %loop |
| 267 | ; CHECK-V8_1M-LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] |
| 268 | ; CHECK-V8_1M-LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.a = getelementptr i32, i32* %A, i32 %iv |
Sam Parker | f2675ab | 2020-08-05 09:37:53 +0100 | [diff] [blame] | 269 | ; CHECK-V8_1M-LATENCY-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %load = load i32, i32* %addr.a, align 4 |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 270 | ; CHECK-V8_1M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %mul = mul i32 %load, %load |
| 271 | ; CHECK-V8_1M-LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.b = getelementptr i32, i32* %B, i32 %iv |
Sam Parker | f2675ab | 2020-08-05 09:37:53 +0100 | [diff] [blame] | 272 | ; CHECK-V8_1M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %mul, i32* %addr.b, align 4 |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 273 | ; CHECK-V8_1M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 |
| 274 | ; CHECK-V8_1M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N |
| 275 | ; CHECK-V8_1M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %cmp, label %loop, label %exit |
| 276 | ; CHECK-V8_1M-LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] |
| 277 | ; CHECK-V8_1M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %res |
| 278 | ; |
| 279 | ; CHECK-T1-THROUGHPUT-LABEL: 'simple_mul_loop' |
| 280 | ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 |
Sam Parker | 2596da3 | 2020-06-15 08:58:25 +0100 | [diff] [blame] | 281 | ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %zero, label %exit, label %preheader |
| 282 | ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %loop |
| 283 | ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 284 | ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %addr.a = getelementptr i32, i32* %A, i32 %iv |
Sam Parker | f2675ab | 2020-08-05 09:37:53 +0100 | [diff] [blame] | 285 | ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load = load i32, i32* %addr.a, align 4 |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 286 | ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %mul = mul i32 %load, %load |
| 287 | ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %addr.b = getelementptr i32, i32* %B, i32 %iv |
Sam Parker | f2675ab | 2020-08-05 09:37:53 +0100 | [diff] [blame] | 288 | ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %mul, i32* %addr.b, align 4 |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 289 | ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 |
| 290 | ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N |
Sam Parker | 2596da3 | 2020-06-15 08:58:25 +0100 | [diff] [blame] | 291 | ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %cmp, label %loop, label %exit |
| 292 | ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] |
| 293 | ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %res |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 294 | ; |
| 295 | ; CHECK-V8M-THROUGHPUT-LABEL: 'simple_mul_loop' |
| 296 | ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 |
Sam Parker | 2596da3 | 2020-06-15 08:58:25 +0100 | [diff] [blame] | 297 | ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %zero, label %exit, label %preheader |
| 298 | ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %loop |
| 299 | ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 300 | ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.a = getelementptr i32, i32* %A, i32 %iv |
Sam Parker | f2675ab | 2020-08-05 09:37:53 +0100 | [diff] [blame] | 301 | ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load = load i32, i32* %addr.a, align 4 |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 302 | ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %mul = mul i32 %load, %load |
| 303 | ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.b = getelementptr i32, i32* %B, i32 %iv |
Sam Parker | f2675ab | 2020-08-05 09:37:53 +0100 | [diff] [blame] | 304 | ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %mul, i32* %addr.b, align 4 |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 305 | ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 |
| 306 | ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N |
Sam Parker | 2596da3 | 2020-06-15 08:58:25 +0100 | [diff] [blame] | 307 | ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %cmp, label %loop, label %exit |
| 308 | ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] |
| 309 | ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %res |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 310 | ; |
| 311 | ; CHECK-V8_1M-THROUGHPUT-LABEL: 'simple_mul_loop' |
| 312 | ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 |
Sam Parker | 2596da3 | 2020-06-15 08:58:25 +0100 | [diff] [blame] | 313 | ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %zero, label %exit, label %preheader |
| 314 | ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %loop |
| 315 | ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 316 | ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.a = getelementptr i32, i32* %A, i32 %iv |
Sam Parker | f2675ab | 2020-08-05 09:37:53 +0100 | [diff] [blame] | 317 | ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load = load i32, i32* %addr.a, align 4 |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 318 | ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %mul = mul i32 %load, %load |
| 319 | ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.b = getelementptr i32, i32* %B, i32 %iv |
Sam Parker | f2675ab | 2020-08-05 09:37:53 +0100 | [diff] [blame] | 320 | ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %mul, i32* %addr.b, align 4 |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 321 | ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 |
| 322 | ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N |
Sam Parker | 2596da3 | 2020-06-15 08:58:25 +0100 | [diff] [blame] | 323 | ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %cmp, label %loop, label %exit |
| 324 | ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] |
| 325 | ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %res |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 326 | ; |
Sam Parker | f2675ab | 2020-08-05 09:37:53 +0100 | [diff] [blame] | 327 | ; CHECK-MVE-THROUGHPUT-LABEL: 'simple_mul_loop' |
| 328 | ; CHECK-MVE-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 |
| 329 | ; CHECK-MVE-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %zero, label %exit, label %preheader |
| 330 | ; CHECK-MVE-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %loop |
| 331 | ; CHECK-MVE-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] |
| 332 | ; CHECK-MVE-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.a = getelementptr i32, i32* %A, i32 %iv |
| 333 | ; CHECK-MVE-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load = load i32, i32* %addr.a, align 4 |
| 334 | ; CHECK-MVE-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %mul = mul i32 %load, %load |
| 335 | ; CHECK-MVE-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.b = getelementptr i32, i32* %B, i32 %iv |
| 336 | ; CHECK-MVE-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %mul, i32* %addr.b, align 4 |
| 337 | ; CHECK-MVE-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 |
| 338 | ; CHECK-MVE-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N |
| 339 | ; CHECK-MVE-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %cmp, label %loop, label %exit |
| 340 | ; CHECK-MVE-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] |
| 341 | ; CHECK-MVE-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %res |
| 342 | ; |
| 343 | ; CHECK-NEON-THROUGHPUT-LABEL: 'simple_mul_loop' |
| 344 | ; CHECK-NEON-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 |
| 345 | ; CHECK-NEON-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %zero, label %exit, label %preheader |
| 346 | ; CHECK-NEON-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %loop |
| 347 | ; CHECK-NEON-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] |
| 348 | ; CHECK-NEON-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.a = getelementptr i32, i32* %A, i32 %iv |
| 349 | ; CHECK-NEON-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load = load i32, i32* %addr.a, align 4 |
| 350 | ; CHECK-NEON-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %mul = mul i32 %load, %load |
| 351 | ; CHECK-NEON-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.b = getelementptr i32, i32* %B, i32 %iv |
| 352 | ; CHECK-NEON-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %mul, i32* %addr.b, align 4 |
| 353 | ; CHECK-NEON-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 |
| 354 | ; CHECK-NEON-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N |
| 355 | ; CHECK-NEON-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %cmp, label %loop, label %exit |
| 356 | ; CHECK-NEON-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] |
| 357 | ; CHECK-NEON-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %res |
| 358 | ; |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 359 | entry: |
| 360 | %zero = icmp eq i32 %N, 0 |
| 361 | br i1 %zero, label %exit, label %preheader |
| 362 | |
| 363 | preheader: |
| 364 | br label %loop |
| 365 | |
| 366 | loop: |
| 367 | %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] |
| 368 | %addr.a = getelementptr i32, i32* %A, i32 %iv |
| 369 | %load = load i32, i32* %addr.a |
| 370 | %mul = mul i32 %load, %load |
| 371 | %addr.b = getelementptr i32, i32* %B, i32 %iv |
| 372 | store i32 %mul, i32* %addr.b |
| 373 | %iv.next = add nuw i32 %iv, 1 |
| 374 | %cmp = icmp ne i32 %iv.next, %N |
| 375 | br i1 %cmp, label %loop, label %exit |
| 376 | |
| 377 | exit: |
| 378 | %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] |
| 379 | ret i32 %res |
| 380 | } |
| 381 | |
| 382 | define i32 @simple_mul_ext_lsr_loop(i16* %A, i32* %B, i32 %N) { |
| 383 | ; CHECK-T1-SIZE-LABEL: 'simple_mul_ext_lsr_loop' |
| 384 | ; CHECK-T1-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 |
| 385 | ; CHECK-T1-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %zero, label %exit, label %preheader |
| 386 | ; CHECK-T1-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %loop |
| 387 | ; CHECK-T1-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] |
| 388 | ; CHECK-T1-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.a = phi i16* [ %A, %preheader ], [ %addr.a, %loop ] |
| 389 | ; CHECK-T1-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.b = phi i32* [ %B, %preheader ], [ %addr.b, %loop ] |
Sam Parker | f2675ab | 2020-08-05 09:37:53 +0100 | [diff] [blame] | 390 | ; CHECK-T1-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load = load i16, i16* %addr.a, align 2 |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 391 | ; CHECK-T1-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %sext = sext i16 %load to i32 |
| 392 | ; CHECK-T1-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %mul = mul i32 %sext, 7 |
Sam Parker | f2675ab | 2020-08-05 09:37:53 +0100 | [diff] [blame] | 393 | ; CHECK-T1-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %mul, i32* %addr.b, align 4 |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 394 | ; CHECK-T1-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 |
| 395 | ; CHECK-T1-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.a.next = getelementptr i16, i16* %addr.a, i32 1 |
| 396 | ; CHECK-T1-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.b.next = getelementptr i32, i32* %addr.b, i32 1 |
| 397 | ; CHECK-T1-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N |
| 398 | ; CHECK-T1-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %cmp, label %loop, label %exit |
| 399 | ; CHECK-T1-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] |
| 400 | ; CHECK-T1-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %res |
| 401 | ; |
| 402 | ; CHECK-V8M-SIZE-LABEL: 'simple_mul_ext_lsr_loop' |
| 403 | ; CHECK-V8M-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 |
| 404 | ; CHECK-V8M-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %zero, label %exit, label %preheader |
| 405 | ; CHECK-V8M-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %loop |
| 406 | ; CHECK-V8M-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] |
| 407 | ; CHECK-V8M-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.a = phi i16* [ %A, %preheader ], [ %addr.a, %loop ] |
| 408 | ; CHECK-V8M-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.b = phi i32* [ %B, %preheader ], [ %addr.b, %loop ] |
Sam Parker | f2675ab | 2020-08-05 09:37:53 +0100 | [diff] [blame] | 409 | ; CHECK-V8M-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load = load i16, i16* %addr.a, align 2 |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 410 | ; CHECK-V8M-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %sext = sext i16 %load to i32 |
| 411 | ; CHECK-V8M-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %mul = mul i32 %sext, 7 |
Sam Parker | f2675ab | 2020-08-05 09:37:53 +0100 | [diff] [blame] | 412 | ; CHECK-V8M-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %mul, i32* %addr.b, align 4 |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 413 | ; CHECK-V8M-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 |
| 414 | ; CHECK-V8M-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.a.next = getelementptr i16, i16* %addr.a, i32 1 |
| 415 | ; CHECK-V8M-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.b.next = getelementptr i32, i32* %addr.b, i32 1 |
| 416 | ; CHECK-V8M-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N |
| 417 | ; CHECK-V8M-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %cmp, label %loop, label %exit |
| 418 | ; CHECK-V8M-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] |
| 419 | ; CHECK-V8M-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %res |
| 420 | ; |
Sam Parker | f2675ab | 2020-08-05 09:37:53 +0100 | [diff] [blame] | 421 | ; CHECK-MVE-SIZE-LABEL: 'simple_mul_ext_lsr_loop' |
| 422 | ; CHECK-MVE-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 |
| 423 | ; CHECK-MVE-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %zero, label %exit, label %preheader |
| 424 | ; CHECK-MVE-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %loop |
| 425 | ; CHECK-MVE-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] |
| 426 | ; CHECK-MVE-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.a = phi i16* [ %A, %preheader ], [ %addr.a, %loop ] |
| 427 | ; CHECK-MVE-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.b = phi i32* [ %B, %preheader ], [ %addr.b, %loop ] |
| 428 | ; CHECK-MVE-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load = load i16, i16* %addr.a, align 2 |
| 429 | ; CHECK-MVE-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %sext = sext i16 %load to i32 |
| 430 | ; CHECK-MVE-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %mul = mul i32 %sext, 7 |
| 431 | ; CHECK-MVE-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %mul, i32* %addr.b, align 4 |
| 432 | ; CHECK-MVE-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 |
| 433 | ; CHECK-MVE-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.a.next = getelementptr i16, i16* %addr.a, i32 1 |
| 434 | ; CHECK-MVE-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.b.next = getelementptr i32, i32* %addr.b, i32 1 |
| 435 | ; CHECK-MVE-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N |
| 436 | ; CHECK-MVE-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %cmp, label %loop, label %exit |
| 437 | ; CHECK-MVE-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] |
| 438 | ; CHECK-MVE-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %res |
| 439 | ; |
| 440 | ; CHECK-NEON-SIZE-LABEL: 'simple_mul_ext_lsr_loop' |
| 441 | ; CHECK-NEON-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 |
| 442 | ; CHECK-NEON-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %zero, label %exit, label %preheader |
| 443 | ; CHECK-NEON-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %loop |
| 444 | ; CHECK-NEON-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] |
| 445 | ; CHECK-NEON-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.a = phi i16* [ %A, %preheader ], [ %addr.a, %loop ] |
| 446 | ; CHECK-NEON-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.b = phi i32* [ %B, %preheader ], [ %addr.b, %loop ] |
| 447 | ; CHECK-NEON-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load = load i16, i16* %addr.a, align 2 |
| 448 | ; CHECK-NEON-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %sext = sext i16 %load to i32 |
| 449 | ; CHECK-NEON-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %mul = mul i32 %sext, 7 |
| 450 | ; CHECK-NEON-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %mul, i32* %addr.b, align 4 |
| 451 | ; CHECK-NEON-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 |
| 452 | ; CHECK-NEON-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.a.next = getelementptr i16, i16* %addr.a, i32 1 |
| 453 | ; CHECK-NEON-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.b.next = getelementptr i32, i32* %addr.b, i32 1 |
| 454 | ; CHECK-NEON-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N |
| 455 | ; CHECK-NEON-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %cmp, label %loop, label %exit |
| 456 | ; CHECK-NEON-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] |
| 457 | ; CHECK-NEON-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %res |
| 458 | ; |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 459 | ; CHECK-T1-LATENCY-LABEL: 'simple_mul_ext_lsr_loop' |
| 460 | ; CHECK-T1-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 |
| 461 | ; CHECK-T1-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %zero, label %exit, label %preheader |
| 462 | ; CHECK-T1-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %loop |
| 463 | ; CHECK-T1-LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] |
| 464 | ; CHECK-T1-LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.a = phi i16* [ %A, %preheader ], [ %addr.a, %loop ] |
| 465 | ; CHECK-T1-LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.b = phi i32* [ %B, %preheader ], [ %addr.b, %loop ] |
Sam Parker | f2675ab | 2020-08-05 09:37:53 +0100 | [diff] [blame] | 466 | ; CHECK-T1-LATENCY-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %load = load i16, i16* %addr.a, align 2 |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 467 | ; CHECK-T1-LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %sext = sext i16 %load to i32 |
| 468 | ; CHECK-T1-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %mul = mul i32 %sext, 7 |
Sam Parker | f2675ab | 2020-08-05 09:37:53 +0100 | [diff] [blame] | 469 | ; CHECK-T1-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %mul, i32* %addr.b, align 4 |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 470 | ; CHECK-T1-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 |
| 471 | ; CHECK-T1-LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.a.next = getelementptr i16, i16* %addr.a, i32 1 |
| 472 | ; CHECK-T1-LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.b.next = getelementptr i32, i32* %addr.b, i32 1 |
| 473 | ; CHECK-T1-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N |
| 474 | ; CHECK-T1-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %cmp, label %loop, label %exit |
| 475 | ; CHECK-T1-LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] |
| 476 | ; CHECK-T1-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %res |
| 477 | ; |
| 478 | ; CHECK-V8M-LATENCY-LABEL: 'simple_mul_ext_lsr_loop' |
| 479 | ; CHECK-V8M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 |
| 480 | ; CHECK-V8M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %zero, label %exit, label %preheader |
| 481 | ; CHECK-V8M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %loop |
| 482 | ; CHECK-V8M-LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] |
| 483 | ; CHECK-V8M-LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.a = phi i16* [ %A, %preheader ], [ %addr.a, %loop ] |
| 484 | ; CHECK-V8M-LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.b = phi i32* [ %B, %preheader ], [ %addr.b, %loop ] |
Sam Parker | f2675ab | 2020-08-05 09:37:53 +0100 | [diff] [blame] | 485 | ; CHECK-V8M-LATENCY-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %load = load i16, i16* %addr.a, align 2 |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 486 | ; CHECK-V8M-LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %sext = sext i16 %load to i32 |
| 487 | ; CHECK-V8M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %mul = mul i32 %sext, 7 |
Sam Parker | f2675ab | 2020-08-05 09:37:53 +0100 | [diff] [blame] | 488 | ; CHECK-V8M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %mul, i32* %addr.b, align 4 |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 489 | ; CHECK-V8M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 |
| 490 | ; CHECK-V8M-LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.a.next = getelementptr i16, i16* %addr.a, i32 1 |
| 491 | ; CHECK-V8M-LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.b.next = getelementptr i32, i32* %addr.b, i32 1 |
| 492 | ; CHECK-V8M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N |
| 493 | ; CHECK-V8M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %cmp, label %loop, label %exit |
| 494 | ; CHECK-V8M-LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] |
| 495 | ; CHECK-V8M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %res |
| 496 | ; |
| 497 | ; CHECK-V8_1M-LATENCY-LABEL: 'simple_mul_ext_lsr_loop' |
| 498 | ; CHECK-V8_1M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 |
| 499 | ; CHECK-V8_1M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %zero, label %exit, label %preheader |
| 500 | ; CHECK-V8_1M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %loop |
| 501 | ; CHECK-V8_1M-LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] |
| 502 | ; CHECK-V8_1M-LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.a = phi i16* [ %A, %preheader ], [ %addr.a, %loop ] |
| 503 | ; CHECK-V8_1M-LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.b = phi i32* [ %B, %preheader ], [ %addr.b, %loop ] |
Sam Parker | f2675ab | 2020-08-05 09:37:53 +0100 | [diff] [blame] | 504 | ; CHECK-V8_1M-LATENCY-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %load = load i16, i16* %addr.a, align 2 |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 505 | ; CHECK-V8_1M-LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %sext = sext i16 %load to i32 |
| 506 | ; CHECK-V8_1M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %mul = mul i32 %sext, 7 |
Sam Parker | f2675ab | 2020-08-05 09:37:53 +0100 | [diff] [blame] | 507 | ; CHECK-V8_1M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %mul, i32* %addr.b, align 4 |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 508 | ; CHECK-V8_1M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 |
| 509 | ; CHECK-V8_1M-LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.a.next = getelementptr i16, i16* %addr.a, i32 1 |
| 510 | ; CHECK-V8_1M-LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.b.next = getelementptr i32, i32* %addr.b, i32 1 |
| 511 | ; CHECK-V8_1M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N |
| 512 | ; CHECK-V8_1M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %cmp, label %loop, label %exit |
| 513 | ; CHECK-V8_1M-LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] |
| 514 | ; CHECK-V8_1M-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %res |
| 515 | ; |
| 516 | ; CHECK-T1-THROUGHPUT-LABEL: 'simple_mul_ext_lsr_loop' |
| 517 | ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 |
Sam Parker | 2596da3 | 2020-06-15 08:58:25 +0100 | [diff] [blame] | 518 | ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %zero, label %exit, label %preheader |
| 519 | ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %loop |
| 520 | ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] |
| 521 | ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %addr.a = phi i16* [ %A, %preheader ], [ %addr.a, %loop ] |
| 522 | ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %addr.b = phi i32* [ %B, %preheader ], [ %addr.b, %loop ] |
Sam Parker | f2675ab | 2020-08-05 09:37:53 +0100 | [diff] [blame] | 523 | ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load = load i16, i16* %addr.a, align 2 |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 524 | ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %sext = sext i16 %load to i32 |
| 525 | ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %mul = mul i32 %sext, 7 |
Sam Parker | f2675ab | 2020-08-05 09:37:53 +0100 | [diff] [blame] | 526 | ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %mul, i32* %addr.b, align 4 |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 527 | ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 |
| 528 | ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.a.next = getelementptr i16, i16* %addr.a, i32 1 |
| 529 | ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.b.next = getelementptr i32, i32* %addr.b, i32 1 |
| 530 | ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N |
Sam Parker | 2596da3 | 2020-06-15 08:58:25 +0100 | [diff] [blame] | 531 | ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %cmp, label %loop, label %exit |
| 532 | ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] |
| 533 | ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %res |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 534 | ; |
| 535 | ; CHECK-V8M-THROUGHPUT-LABEL: 'simple_mul_ext_lsr_loop' |
| 536 | ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 |
Sam Parker | 2596da3 | 2020-06-15 08:58:25 +0100 | [diff] [blame] | 537 | ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %zero, label %exit, label %preheader |
| 538 | ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %loop |
| 539 | ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] |
| 540 | ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %addr.a = phi i16* [ %A, %preheader ], [ %addr.a, %loop ] |
| 541 | ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %addr.b = phi i32* [ %B, %preheader ], [ %addr.b, %loop ] |
Sam Parker | f2675ab | 2020-08-05 09:37:53 +0100 | [diff] [blame] | 542 | ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load = load i16, i16* %addr.a, align 2 |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 543 | ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %sext = sext i16 %load to i32 |
| 544 | ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %mul = mul i32 %sext, 7 |
Sam Parker | f2675ab | 2020-08-05 09:37:53 +0100 | [diff] [blame] | 545 | ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %mul, i32* %addr.b, align 4 |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 546 | ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 |
| 547 | ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.a.next = getelementptr i16, i16* %addr.a, i32 1 |
| 548 | ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.b.next = getelementptr i32, i32* %addr.b, i32 1 |
| 549 | ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N |
Sam Parker | 2596da3 | 2020-06-15 08:58:25 +0100 | [diff] [blame] | 550 | ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %cmp, label %loop, label %exit |
| 551 | ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] |
| 552 | ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %res |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 553 | ; |
| 554 | ; CHECK-V8_1M-THROUGHPUT-LABEL: 'simple_mul_ext_lsr_loop' |
| 555 | ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 |
Sam Parker | 2596da3 | 2020-06-15 08:58:25 +0100 | [diff] [blame] | 556 | ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %zero, label %exit, label %preheader |
| 557 | ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %loop |
| 558 | ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] |
| 559 | ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %addr.a = phi i16* [ %A, %preheader ], [ %addr.a, %loop ] |
| 560 | ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %addr.b = phi i32* [ %B, %preheader ], [ %addr.b, %loop ] |
Sam Parker | f2675ab | 2020-08-05 09:37:53 +0100 | [diff] [blame] | 561 | ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load = load i16, i16* %addr.a, align 2 |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 562 | ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %sext = sext i16 %load to i32 |
| 563 | ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %mul = mul i32 %sext, 7 |
Sam Parker | f2675ab | 2020-08-05 09:37:53 +0100 | [diff] [blame] | 564 | ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %mul, i32* %addr.b, align 4 |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 565 | ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 |
| 566 | ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.a.next = getelementptr i16, i16* %addr.a, i32 1 |
| 567 | ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.b.next = getelementptr i32, i32* %addr.b, i32 1 |
| 568 | ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N |
Sam Parker | 2596da3 | 2020-06-15 08:58:25 +0100 | [diff] [blame] | 569 | ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %cmp, label %loop, label %exit |
| 570 | ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] |
| 571 | ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %res |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 572 | ; |
Sam Parker | f2675ab | 2020-08-05 09:37:53 +0100 | [diff] [blame] | 573 | ; CHECK-MVE-THROUGHPUT-LABEL: 'simple_mul_ext_lsr_loop' |
| 574 | ; CHECK-MVE-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 |
| 575 | ; CHECK-MVE-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %zero, label %exit, label %preheader |
| 576 | ; CHECK-MVE-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %loop |
| 577 | ; CHECK-MVE-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] |
| 578 | ; CHECK-MVE-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.a = phi i16* [ %A, %preheader ], [ %addr.a, %loop ] |
| 579 | ; CHECK-MVE-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.b = phi i32* [ %B, %preheader ], [ %addr.b, %loop ] |
| 580 | ; CHECK-MVE-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load = load i16, i16* %addr.a, align 2 |
| 581 | ; CHECK-MVE-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %sext = sext i16 %load to i32 |
| 582 | ; CHECK-MVE-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %mul = mul i32 %sext, 7 |
| 583 | ; CHECK-MVE-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %mul, i32* %addr.b, align 4 |
| 584 | ; CHECK-MVE-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 |
| 585 | ; CHECK-MVE-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.a.next = getelementptr i16, i16* %addr.a, i32 1 |
| 586 | ; CHECK-MVE-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.b.next = getelementptr i32, i32* %addr.b, i32 1 |
| 587 | ; CHECK-MVE-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N |
| 588 | ; CHECK-MVE-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %cmp, label %loop, label %exit |
| 589 | ; CHECK-MVE-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] |
| 590 | ; CHECK-MVE-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %res |
| 591 | ; |
| 592 | ; CHECK-NEON-THROUGHPUT-LABEL: 'simple_mul_ext_lsr_loop' |
| 593 | ; CHECK-NEON-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 |
| 594 | ; CHECK-NEON-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %zero, label %exit, label %preheader |
| 595 | ; CHECK-NEON-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %loop |
| 596 | ; CHECK-NEON-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] |
| 597 | ; CHECK-NEON-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.a = phi i16* [ %A, %preheader ], [ %addr.a, %loop ] |
| 598 | ; CHECK-NEON-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.b = phi i32* [ %B, %preheader ], [ %addr.b, %loop ] |
| 599 | ; CHECK-NEON-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load = load i16, i16* %addr.a, align 2 |
| 600 | ; CHECK-NEON-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %sext = sext i16 %load to i32 |
| 601 | ; CHECK-NEON-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %mul = mul i32 %sext, 7 |
| 602 | ; CHECK-NEON-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %mul, i32* %addr.b, align 4 |
| 603 | ; CHECK-NEON-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 |
| 604 | ; CHECK-NEON-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.a.next = getelementptr i16, i16* %addr.a, i32 1 |
| 605 | ; CHECK-NEON-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.b.next = getelementptr i32, i32* %addr.b, i32 1 |
| 606 | ; CHECK-NEON-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N |
| 607 | ; CHECK-NEON-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %cmp, label %loop, label %exit |
| 608 | ; CHECK-NEON-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] |
| 609 | ; CHECK-NEON-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %res |
| 610 | ; |
Sam Parker | 850bdef | 2020-04-29 12:36:05 +0100 | [diff] [blame] | 611 | entry: |
| 612 | %zero = icmp eq i32 %N, 0 |
| 613 | br i1 %zero, label %exit, label %preheader |
| 614 | |
| 615 | preheader: |
| 616 | br label %loop |
| 617 | |
| 618 | loop: |
| 619 | %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] |
| 620 | %addr.a = phi i16* [ %A, %preheader ], [ %addr.a, %loop ] |
| 621 | %addr.b = phi i32* [ %B, %preheader ], [ %addr.b, %loop ] |
| 622 | %load = load i16, i16* %addr.a |
| 623 | %sext = sext i16 %load to i32 |
| 624 | %mul = mul i32 %sext, 7 |
| 625 | store i32 %mul, i32* %addr.b |
| 626 | %iv.next = add nuw i32 %iv, 1 |
| 627 | %addr.a.next = getelementptr i16, i16* %addr.a, i32 1 |
| 628 | %addr.b.next = getelementptr i32, i32* %addr.b, i32 1 |
| 629 | %cmp = icmp ne i32 %iv.next, %N |
| 630 | br i1 %cmp, label %loop, label %exit |
| 631 | |
| 632 | exit: |
| 633 | %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] |
| 634 | ret i32 %res |
| 635 | } |