1 ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
2 ; RUN: opt -mtriple=armv8.1m.main -mattr=+mve.fp -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=throughput < %s | FileCheck %s --check-prefix=THRU
3 ; RUN: opt -mtriple=armv8.1m.main -mattr=+mve.fp -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=latency < %s | FileCheck %s --check-prefix=LATE
4 ; RUN: opt -mtriple=armv8.1m.main -mattr=+mve.fp -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size < %s | FileCheck %s --check-prefix=SIZE
5 ; RUN: opt -mtriple=armv8.1m.main -mattr=+mve.fp -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=size-latency < %s | FileCheck %s --check-prefix=SIZE_LATE
7 target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
9 ; Test a cross-section of intrinsics for various cost-kinds.
10 ; Other test files may check for accuracy of a particular intrinsic
11 ; across subtargets or types. This is just a basic correctness check using an
12 ; ARM target and a legal scalar type (i32/float) and/or an
13 ; illegal vector type (16 x i32/float).
15 declare i32 @llvm.smax.i32(i32, i32)
16 declare <16 x i32> @llvm.smax.v16i32(<16 x i32>, <16 x i32>)
18 declare float @llvm.fmuladd.f32(float, float, float)
19 declare <16 x float> @llvm.fmuladd.v16f32(<16 x float>, <16 x float>, <16 x float>)
21 declare float @llvm.log2.f32(float)
22 declare <16 x float> @llvm.log2.v16f32(<16 x float>)
24 declare float @llvm.experimental.constrained.fadd.f32(float, float, metadata, metadata)
25 declare <16 x float> @llvm.experimental.constrained.fadd.v16f32(<16 x float>, <16 x float>, metadata, metadata)
27 declare float @llvm.maximum.f32(float, float)
28 declare <16 x float> @llvm.maximum.v16f32(<16 x float>, <16 x float>)
30 declare i32 @llvm.cttz.i32(i32, i1)
31 declare <16 x i32> @llvm.cttz.v16i32(<16 x i32>, i1)
33 declare i32 @llvm.ctlz.i32(i32, i1)
34 declare <16 x i32> @llvm.ctlz.v16i32(<16 x i32>, i1)
36 declare i32 @llvm.fshl.i32(i32, i32, i32)
37 declare <16 x i32> @llvm.fshl.v16i32(<16 x i32>, <16 x i32>, <16 x i32>)
39 declare <16 x float> @llvm.masked.gather.v16f32.v16p0(<16 x ptr>, i32, <16 x i1>, <16 x float>)
40 declare void @llvm.masked.scatter.v16f32.v16p0(<16 x float>, <16 x ptr>, i32, <16 x i1>)
41 declare float @llvm.vector.reduce.fmax.v16f32(<16 x float>)
43 declare void @llvm.memcpy.p0.p0.i32(ptr, ptr, i32, i1)
45 define void @smax(i32 %a, i32 %b, <16 x i32> %va, <16 x i32> %vb) {
47 ; THRU-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s = call i32 @llvm.smax.i32(i32 %a, i32 %b)
48 ; THRU-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v = call <16 x i32> @llvm.smax.v16i32(<16 x i32> %va, <16 x i32> %vb)
49 ; THRU-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
52 ; LATE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s = call i32 @llvm.smax.i32(i32 %a, i32 %b)
53 ; LATE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v = call <16 x i32> @llvm.smax.v16i32(<16 x i32> %va, <16 x i32> %vb)
54 ; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
57 ; SIZE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %s = call i32 @llvm.smax.i32(i32 %a, i32 %b)
58 ; SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v = call <16 x i32> @llvm.smax.v16i32(<16 x i32> %va, <16 x i32> %vb)
59 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
61 ; SIZE_LATE-LABEL: 'smax'
62 ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s = call i32 @llvm.smax.i32(i32 %a, i32 %b)
63 ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v = call <16 x i32> @llvm.smax.v16i32(<16 x i32> %va, <16 x i32> %vb)
64 ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
66 %s = call i32 @llvm.smax.i32(i32 %a, i32 %b)
67 %v = call <16 x i32> @llvm.smax.v16i32(<16 x i32> %va, <16 x i32> %vb)
71 define void @fmuladd(float %a, float %b, float %c, <16 x float> %va, <16 x float> %vb, <16 x float> %vc) {
72 ; THRU-LABEL: 'fmuladd'
73 ; THRU-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s = call float @llvm.fmuladd.f32(float %a, float %b, float %c)
74 ; THRU-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v = call <16 x float> @llvm.fmuladd.v16f32(<16 x float> %va, <16 x float> %vb, <16 x float> %vc)
75 ; THRU-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
77 ; LATE-LABEL: 'fmuladd'
78 ; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s = call float @llvm.fmuladd.f32(float %a, float %b, float %c)
79 ; LATE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v = call <16 x float> @llvm.fmuladd.v16f32(<16 x float> %va, <16 x float> %vb, <16 x float> %vc)
80 ; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
82 ; SIZE-LABEL: 'fmuladd'
83 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s = call float @llvm.fmuladd.f32(float %a, float %b, float %c)
84 ; SIZE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v = call <16 x float> @llvm.fmuladd.v16f32(<16 x float> %va, <16 x float> %vb, <16 x float> %vc)
85 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
87 ; SIZE_LATE-LABEL: 'fmuladd'
88 ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s = call float @llvm.fmuladd.f32(float %a, float %b, float %c)
89 ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v = call <16 x float> @llvm.fmuladd.v16f32(<16 x float> %va, <16 x float> %vb, <16 x float> %vc)
90 ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
92 %s = call float @llvm.fmuladd.f32(float %a, float %b, float %c)
93 %v = call <16 x float> @llvm.fmuladd.v16f32(<16 x float> %va, <16 x float> %vb, <16 x float> %vc)
97 define void @log2(float %a, <16 x float> %va) {
99 ; THRU-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %s = call float @llvm.log2.f32(float %a)
100 ; THRU-NEXT: Cost Model: Found an estimated cost of 192 for instruction: %v = call <16 x float> @llvm.log2.v16f32(<16 x float> %va)
101 ; THRU-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
104 ; LATE-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %s = call float @llvm.log2.f32(float %a)
105 ; LATE-NEXT: Cost Model: Found an estimated cost of 192 for instruction: %v = call <16 x float> @llvm.log2.v16f32(<16 x float> %va)
106 ; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
109 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s = call float @llvm.log2.f32(float %a)
110 ; SIZE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %v = call <16 x float> @llvm.log2.v16f32(<16 x float> %va)
111 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
113 ; SIZE_LATE-LABEL: 'log2'
114 ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %s = call float @llvm.log2.f32(float %a)
115 ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 192 for instruction: %v = call <16 x float> @llvm.log2.v16f32(<16 x float> %va)
116 ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
118 %s = call float @llvm.log2.f32(float %a)
119 %v = call <16 x float> @llvm.log2.v16f32(<16 x float> %va)
123 define void @constrained_fadd(float %a, <16 x float> %va) {
124 ; THRU-LABEL: 'constrained_fadd'
125 ; THRU-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s = call float @llvm.experimental.constrained.fadd.f32(float %a, float %a, metadata !"round.dynamic", metadata !"fpexcept.ignore")
126 ; THRU-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %t = call <16 x float> @llvm.experimental.constrained.fadd.v16f32(<16 x float> %va, <16 x float> %va, metadata !"round.dynamic", metadata !"fpexcept.ignore")
127 ; THRU-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
129 ; LATE-LABEL: 'constrained_fadd'
130 ; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s = call float @llvm.experimental.constrained.fadd.f32(float %a, float %a, metadata !"round.dynamic", metadata !"fpexcept.ignore")
131 ; LATE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %t = call <16 x float> @llvm.experimental.constrained.fadd.v16f32(<16 x float> %va, <16 x float> %va, metadata !"round.dynamic", metadata !"fpexcept.ignore")
132 ; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
134 ; SIZE-LABEL: 'constrained_fadd'
135 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s = call float @llvm.experimental.constrained.fadd.f32(float %a, float %a, metadata !"round.dynamic", metadata !"fpexcept.ignore")
136 ; SIZE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %t = call <16 x float> @llvm.experimental.constrained.fadd.v16f32(<16 x float> %va, <16 x float> %va, metadata !"round.dynamic", metadata !"fpexcept.ignore")
137 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
139 ; SIZE_LATE-LABEL: 'constrained_fadd'
140 ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s = call float @llvm.experimental.constrained.fadd.f32(float %a, float %a, metadata !"round.dynamic", metadata !"fpexcept.ignore")
141 ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %t = call <16 x float> @llvm.experimental.constrained.fadd.v16f32(<16 x float> %va, <16 x float> %va, metadata !"round.dynamic", metadata !"fpexcept.ignore")
142 ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
144 %s = call float @llvm.experimental.constrained.fadd.f32(float %a, float %a, metadata !"round.dynamic", metadata !"fpexcept.ignore")
145 %t = call <16 x float> @llvm.experimental.constrained.fadd.v16f32(<16 x float> %va, <16 x float> %va, metadata !"round.dynamic", metadata !"fpexcept.ignore")
149 define void @fmaximum(float %a, float %b, <16 x float> %va, <16 x float> %vb) {
150 ; THRU-LABEL: 'fmaximum'
151 ; THRU-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %s = call float @llvm.maximum.f32(float %a, float %b)
152 ; THRU-NEXT: Cost Model: Found an estimated cost of 208 for instruction: %v = call <16 x float> @llvm.maximum.v16f32(<16 x float> %va, <16 x float> %vb)
153 ; THRU-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
155 ; LATE-LABEL: 'fmaximum'
156 ; LATE-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %s = call float @llvm.maximum.f32(float %a, float %b)
157 ; LATE-NEXT: Cost Model: Found an estimated cost of 208 for instruction: %v = call <16 x float> @llvm.maximum.v16f32(<16 x float> %va, <16 x float> %vb)
158 ; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
160 ; SIZE-LABEL: 'fmaximum'
161 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s = call float @llvm.maximum.f32(float %a, float %b)
162 ; SIZE-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %v = call <16 x float> @llvm.maximum.v16f32(<16 x float> %va, <16 x float> %vb)
163 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
165 ; SIZE_LATE-LABEL: 'fmaximum'
166 ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %s = call float @llvm.maximum.f32(float %a, float %b)
167 ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 208 for instruction: %v = call <16 x float> @llvm.maximum.v16f32(<16 x float> %va, <16 x float> %vb)
168 ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
170 %s = call float @llvm.maximum.f32(float %a, float %b)
171 %v = call <16 x float> @llvm.maximum.v16f32(<16 x float> %va, <16 x float> %vb)
175 define void @cttz(i32 %a, <16 x i32> %va) {
177 ; THRU-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s = call i32 @llvm.cttz.i32(i32 %a, i1 false)
178 ; THRU-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v = call <16 x i32> @llvm.cttz.v16i32(<16 x i32> %va, i1 false)
179 ; THRU-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
182 ; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s = call i32 @llvm.cttz.i32(i32 %a, i1 false)
183 ; LATE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v = call <16 x i32> @llvm.cttz.v16i32(<16 x i32> %va, i1 false)
184 ; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
187 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s = call i32 @llvm.cttz.i32(i32 %a, i1 false)
188 ; SIZE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v = call <16 x i32> @llvm.cttz.v16i32(<16 x i32> %va, i1 false)
189 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
191 ; SIZE_LATE-LABEL: 'cttz'
192 ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s = call i32 @llvm.cttz.i32(i32 %a, i1 false)
193 ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v = call <16 x i32> @llvm.cttz.v16i32(<16 x i32> %va, i1 false)
194 ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
196 %s = call i32 @llvm.cttz.i32(i32 %a, i1 false)
197 %v = call <16 x i32> @llvm.cttz.v16i32(<16 x i32> %va, i1 false)
201 define void @ctlz(i32 %a, <16 x i32> %va) {
203 ; THRU-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s = call i32 @llvm.ctlz.i32(i32 %a, i1 true)
204 ; THRU-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %va, i1 true)
205 ; THRU-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
208 ; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s = call i32 @llvm.ctlz.i32(i32 %a, i1 true)
209 ; LATE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %va, i1 true)
210 ; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
213 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s = call i32 @llvm.ctlz.i32(i32 %a, i1 true)
214 ; SIZE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %va, i1 true)
215 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
217 ; SIZE_LATE-LABEL: 'ctlz'
218 ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s = call i32 @llvm.ctlz.i32(i32 %a, i1 true)
219 ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %va, i1 true)
220 ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
222 %s = call i32 @llvm.ctlz.i32(i32 %a, i1 true)
223 %v = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %va, i1 true)
227 define void @fshl(i32 %a, i32 %b, i32 %c, <16 x i32> %va, <16 x i32> %vb, <16 x i32> %vc) {
229 ; THRU-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %s = call i32 @llvm.fshl.i32(i32 %a, i32 %b, i32 %c)
230 ; THRU-NEXT: Cost Model: Found an estimated cost of 256 for instruction: %v = call <16 x i32> @llvm.fshl.v16i32(<16 x i32> %va, <16 x i32> %vb, <16 x i32> %vc)
231 ; THRU-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
234 ; LATE-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %s = call i32 @llvm.fshl.i32(i32 %a, i32 %b, i32 %c)
235 ; LATE-NEXT: Cost Model: Found an estimated cost of 250 for instruction: %v = call <16 x i32> @llvm.fshl.v16i32(<16 x i32> %va, <16 x i32> %vb, <16 x i32> %vc)
236 ; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
239 ; SIZE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %s = call i32 @llvm.fshl.i32(i32 %a, i32 %b, i32 %c)
240 ; SIZE-NEXT: Cost Model: Found an estimated cost of 229 for instruction: %v = call <16 x i32> @llvm.fshl.v16i32(<16 x i32> %va, <16 x i32> %vb, <16 x i32> %vc)
241 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
243 ; SIZE_LATE-LABEL: 'fshl'
244 ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %s = call i32 @llvm.fshl.i32(i32 %a, i32 %b, i32 %c)
245 ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 250 for instruction: %v = call <16 x i32> @llvm.fshl.v16i32(<16 x i32> %va, <16 x i32> %vb, <16 x i32> %vc)
246 ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
248 %s = call i32 @llvm.fshl.i32(i32 %a, i32 %b, i32 %c)
249 %v = call <16 x i32> @llvm.fshl.v16i32(<16 x i32> %va, <16 x i32> %vb, <16 x i32> %vc)
253 define void @maskedgather(<16 x ptr> %va, <16 x i1> %vb, <16 x float> %vc) {
254 ; THRU-LABEL: 'maskedgather'
255 ; THRU-NEXT: Cost Model: Found an estimated cost of 176 for instruction: %v = call <16 x float> @llvm.masked.gather.v16f32.v16p0(<16 x ptr> %va, i32 1, <16 x i1> %vb, <16 x float> %vc)
256 ; THRU-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
258 ; LATE-LABEL: 'maskedgather'
259 ; LATE-NEXT: Cost Model: Found an estimated cost of 176 for instruction: %v = call <16 x float> @llvm.masked.gather.v16f32.v16p0(<16 x ptr> %va, i32 1, <16 x i1> %vb, <16 x float> %vc)
260 ; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
262 ; SIZE-LABEL: 'maskedgather'
263 ; SIZE-NEXT: Cost Model: Found an estimated cost of 176 for instruction: %v = call <16 x float> @llvm.masked.gather.v16f32.v16p0(<16 x ptr> %va, i32 1, <16 x i1> %vb, <16 x float> %vc)
264 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
266 ; SIZE_LATE-LABEL: 'maskedgather'
267 ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 176 for instruction: %v = call <16 x float> @llvm.masked.gather.v16f32.v16p0(<16 x ptr> %va, i32 1, <16 x i1> %vb, <16 x float> %vc)
268 ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
270 %v = call <16 x float> @llvm.masked.gather.v16f32.v16p0(<16 x ptr> %va, i32 1, <16 x i1> %vb, <16 x float> %vc)
274 define void @maskedscatter(<16 x float> %va, <16 x ptr> %vb, <16 x i1> %vc) {
275 ; THRU-LABEL: 'maskedscatter'
276 ; THRU-NEXT: Cost Model: Found an estimated cost of 176 for instruction: call void @llvm.masked.scatter.v16f32.v16p0(<16 x float> %va, <16 x ptr> %vb, i32 1, <16 x i1> %vc)
277 ; THRU-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
279 ; LATE-LABEL: 'maskedscatter'
280 ; LATE-NEXT: Cost Model: Found an estimated cost of 176 for instruction: call void @llvm.masked.scatter.v16f32.v16p0(<16 x float> %va, <16 x ptr> %vb, i32 1, <16 x i1> %vc)
281 ; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
283 ; SIZE-LABEL: 'maskedscatter'
284 ; SIZE-NEXT: Cost Model: Found an estimated cost of 176 for instruction: call void @llvm.masked.scatter.v16f32.v16p0(<16 x float> %va, <16 x ptr> %vb, i32 1, <16 x i1> %vc)
285 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
287 ; SIZE_LATE-LABEL: 'maskedscatter'
288 ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 176 for instruction: call void @llvm.masked.scatter.v16f32.v16p0(<16 x float> %va, <16 x ptr> %vb, i32 1, <16 x i1> %vc)
289 ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
291 call void @llvm.masked.scatter.v16f32.v16p0(<16 x float> %va, <16 x ptr> %vb, i32 1, <16 x i1> %vc)
295 define void @reduce_fmax(<16 x float> %va) {
296 ; THRU-LABEL: 'reduce_fmax'
297 ; THRU-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %v = call float @llvm.vector.reduce.fmax.v16f32(<16 x float> %va)
298 ; THRU-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
300 ; LATE-LABEL: 'reduce_fmax'
301 ; LATE-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %v = call float @llvm.vector.reduce.fmax.v16f32(<16 x float> %va)
302 ; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
304 ; SIZE-LABEL: 'reduce_fmax'
305 ; SIZE-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v = call float @llvm.vector.reduce.fmax.v16f32(<16 x float> %va)
306 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
308 ; SIZE_LATE-LABEL: 'reduce_fmax'
309 ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %v = call float @llvm.vector.reduce.fmax.v16f32(<16 x float> %va)
310 ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
312 %v = call float @llvm.vector.reduce.fmax.v16f32(<16 x float> %va)
316 define void @memcpy(ptr %a, ptr %b, i32 %c) {
317 ; THRU-LABEL: 'memcpy'
318 ; THRU-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.memcpy.p0.p0.i32(ptr align 1 %a, ptr align 1 %b, i32 32, i1 false)
319 ; THRU-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
321 ; LATE-LABEL: 'memcpy'
322 ; LATE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.memcpy.p0.p0.i32(ptr align 1 %a, ptr align 1 %b, i32 32, i1 false)
323 ; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
325 ; SIZE-LABEL: 'memcpy'
326 ; SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.memcpy.p0.p0.i32(ptr align 1 %a, ptr align 1 %b, i32 32, i1 false)
327 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
329 ; SIZE_LATE-LABEL: 'memcpy'
330 ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.memcpy.p0.p0.i32(ptr align 1 %a, ptr align 1 %b, i32 32, i1 false)
331 ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
333 call void @llvm.memcpy.p0.p0.i32(ptr align 1 %a, ptr align 1 %b, i32 32, i1 false)