1 ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
2 ; RUN: opt < %s -mtriple=armv8a-linux-gnueabihf -mattr=+fp64 -passes="print<cost-model>" 2>&1 -disable-output | FileCheck %s --check-prefix=CHECK-V8
3 ; RUN: opt < %s -mtriple=thumbv8.1m.main-none-eabi -mattr=+mve.fp -passes="print<cost-model>" 2>&1 -disable-output | FileCheck %s --check-prefix=CHECK-MVEFP
4 ; RUN: opt < %s -mtriple=thumbv8.1m.main-none-eabi -mattr=+mve -passes="print<cost-model>" 2>&1 -disable-output | FileCheck %s --check-prefix=CHECK-MVEI
6 target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
8 define void @fmin_strict() {
9 ; CHECK-V8-LABEL: 'fmin_strict'
10 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %fmin_v2f16 = call half @llvm.vector.reduce.fmin.v2f16(<2 x half> undef)
11 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %fmin_v4f16 = call half @llvm.vector.reduce.fmin.v4f16(<4 x half> undef)
12 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 43 for instruction: %fmin_v8f16 = call half @llvm.vector.reduce.fmin.v8f16(<8 x half> undef)
13 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 91 for instruction: %fmin_v16f16 = call half @llvm.vector.reduce.fmin.v16f16(<16 x half> undef)
14 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %fmin_v2f32 = call float @llvm.vector.reduce.fmin.v2f32(<2 x float> undef)
15 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %fmin_v4f32 = call float @llvm.vector.reduce.fmin.v4f32(<4 x float> undef)
16 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %fmin_v8f32 = call float @llvm.vector.reduce.fmin.v8f32(<8 x float> undef)
17 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %fmin_v2f64 = call double @llvm.vector.reduce.fmin.v2f64(<2 x double> undef)
18 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %fmin_v4f64 = call double @llvm.vector.reduce.fmin.v4f64(<4 x double> undef)
19 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 94 for instruction: %fmin_v4f128 = call fp128 @llvm.vector.reduce.fmin.v4f128(<4 x fp128> undef)
20 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
22 ; CHECK-MVEFP-LABEL: 'fmin_strict'
23 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %fmin_v2f16 = call half @llvm.vector.reduce.fmin.v2f16(<2 x half> undef)
24 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %fmin_v4f16 = call half @llvm.vector.reduce.fmin.v4f16(<4 x half> undef)
25 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %fmin_v8f16 = call half @llvm.vector.reduce.fmin.v8f16(<8 x half> undef)
26 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %fmin_v16f16 = call half @llvm.vector.reduce.fmin.v16f16(<16 x half> undef)
27 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %fmin_v2f32 = call float @llvm.vector.reduce.fmin.v2f32(<2 x float> undef)
28 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %fmin_v4f32 = call float @llvm.vector.reduce.fmin.v4f32(<4 x float> undef)
29 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %fmin_v8f32 = call float @llvm.vector.reduce.fmin.v8f32(<8 x float> undef)
30 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 35 for instruction: %fmin_v2f64 = call double @llvm.vector.reduce.fmin.v2f64(<2 x double> undef)
31 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 69 for instruction: %fmin_v4f64 = call double @llvm.vector.reduce.fmin.v4f64(<4 x double> undef)
32 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 118 for instruction: %fmin_v4f128 = call fp128 @llvm.vector.reduce.fmin.v4f128(<4 x fp128> undef)
33 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
35 ; CHECK-MVEI-LABEL: 'fmin_strict'
36 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 35 for instruction: %fmin_v2f16 = call half @llvm.vector.reduce.fmin.v2f16(<2 x half> undef)
37 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 137 for instruction: %fmin_v4f16 = call half @llvm.vector.reduce.fmin.v4f16(<4 x half> undef)
38 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 409 for instruction: %fmin_v8f16 = call half @llvm.vector.reduce.fmin.v8f16(<8 x half> undef)
39 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 545 for instruction: %fmin_v16f16 = call half @llvm.vector.reduce.fmin.v16f16(<16 x half> undef)
40 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 35 for instruction: %fmin_v2f32 = call float @llvm.vector.reduce.fmin.v2f32(<2 x float> undef)
41 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 137 for instruction: %fmin_v4f32 = call float @llvm.vector.reduce.fmin.v4f32(<4 x float> undef)
42 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 205 for instruction: %fmin_v8f32 = call float @llvm.vector.reduce.fmin.v8f32(<8 x float> undef)
43 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 35 for instruction: %fmin_v2f64 = call double @llvm.vector.reduce.fmin.v2f64(<2 x double> undef)
44 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 69 for instruction: %fmin_v4f64 = call double @llvm.vector.reduce.fmin.v4f64(<4 x double> undef)
45 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 118 for instruction: %fmin_v4f128 = call fp128 @llvm.vector.reduce.fmin.v4f128(<4 x fp128> undef)
46 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
48 %fmin_v2f16 = call half @llvm.vector.reduce.fmin.v2f16(<2 x half> undef)
49 %fmin_v4f16 = call half @llvm.vector.reduce.fmin.v4f16(<4 x half> undef)
50 %fmin_v8f16 = call half @llvm.vector.reduce.fmin.v8f16(<8 x half> undef)
51 %fmin_v16f16 = call half @llvm.vector.reduce.fmin.v16f16(<16 x half> undef)
52 %fmin_v2f32 = call float @llvm.vector.reduce.fmin.v2f32(<2 x float> undef)
53 %fmin_v4f32 = call float @llvm.vector.reduce.fmin.v4f32(<4 x float> undef)
54 %fmin_v8f32 = call float @llvm.vector.reduce.fmin.v8f32(<8 x float> undef)
55 %fmin_v2f64 = call double @llvm.vector.reduce.fmin.v2f64(<2 x double> undef)
56 %fmin_v4f64 = call double @llvm.vector.reduce.fmin.v4f64(<4 x double> undef)
57 %fmin_v4f128 = call fp128 @llvm.vector.reduce.fmin.v4f128(<4 x fp128> undef)
62 define void @fmin_unordered() {
63 ; CHECK-V8-LABEL: 'fmin_unordered'
64 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %fmin_v2f16 = call reassoc half @llvm.vector.reduce.fmin.v2f16(<2 x half> undef)
65 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %fmin_v4f16 = call reassoc half @llvm.vector.reduce.fmin.v4f16(<4 x half> undef)
66 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 43 for instruction: %fmin_v8f16 = call reassoc half @llvm.vector.reduce.fmin.v8f16(<8 x half> undef)
67 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 91 for instruction: %fmin_v16f16 = call reassoc half @llvm.vector.reduce.fmin.v16f16(<16 x half> undef)
68 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %fmin_v2f32 = call reassoc float @llvm.vector.reduce.fmin.v2f32(<2 x float> undef)
69 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %fmin_v4f32 = call reassoc float @llvm.vector.reduce.fmin.v4f32(<4 x float> undef)
70 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %fmin_v8f32 = call reassoc float @llvm.vector.reduce.fmin.v8f32(<8 x float> undef)
71 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %fmin_v2f64 = call reassoc double @llvm.vector.reduce.fmin.v2f64(<2 x double> undef)
72 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %fmin_v4f64 = call reassoc double @llvm.vector.reduce.fmin.v4f64(<4 x double> undef)
73 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 94 for instruction: %fmin_v4f128 = call reassoc fp128 @llvm.vector.reduce.fmin.v4f128(<4 x fp128> undef)
74 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
76 ; CHECK-MVEFP-LABEL: 'fmin_unordered'
77 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %fmin_v2f16 = call reassoc half @llvm.vector.reduce.fmin.v2f16(<2 x half> undef)
78 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %fmin_v4f16 = call reassoc half @llvm.vector.reduce.fmin.v4f16(<4 x half> undef)
79 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %fmin_v8f16 = call reassoc half @llvm.vector.reduce.fmin.v8f16(<8 x half> undef)
80 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %fmin_v16f16 = call reassoc half @llvm.vector.reduce.fmin.v16f16(<16 x half> undef)
81 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %fmin_v2f32 = call reassoc float @llvm.vector.reduce.fmin.v2f32(<2 x float> undef)
82 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %fmin_v4f32 = call reassoc float @llvm.vector.reduce.fmin.v4f32(<4 x float> undef)
83 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %fmin_v8f32 = call reassoc float @llvm.vector.reduce.fmin.v8f32(<8 x float> undef)
84 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 35 for instruction: %fmin_v2f64 = call reassoc double @llvm.vector.reduce.fmin.v2f64(<2 x double> undef)
85 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 69 for instruction: %fmin_v4f64 = call reassoc double @llvm.vector.reduce.fmin.v4f64(<4 x double> undef)
86 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 118 for instruction: %fmin_v4f128 = call reassoc fp128 @llvm.vector.reduce.fmin.v4f128(<4 x fp128> undef)
87 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
89 ; CHECK-MVEI-LABEL: 'fmin_unordered'
90 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 35 for instruction: %fmin_v2f16 = call reassoc half @llvm.vector.reduce.fmin.v2f16(<2 x half> undef)
91 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 137 for instruction: %fmin_v4f16 = call reassoc half @llvm.vector.reduce.fmin.v4f16(<4 x half> undef)
92 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 409 for instruction: %fmin_v8f16 = call reassoc half @llvm.vector.reduce.fmin.v8f16(<8 x half> undef)
93 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 545 for instruction: %fmin_v16f16 = call reassoc half @llvm.vector.reduce.fmin.v16f16(<16 x half> undef)
94 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 35 for instruction: %fmin_v2f32 = call reassoc float @llvm.vector.reduce.fmin.v2f32(<2 x float> undef)
95 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 137 for instruction: %fmin_v4f32 = call reassoc float @llvm.vector.reduce.fmin.v4f32(<4 x float> undef)
96 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 205 for instruction: %fmin_v8f32 = call reassoc float @llvm.vector.reduce.fmin.v8f32(<8 x float> undef)
97 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 35 for instruction: %fmin_v2f64 = call reassoc double @llvm.vector.reduce.fmin.v2f64(<2 x double> undef)
98 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 69 for instruction: %fmin_v4f64 = call reassoc double @llvm.vector.reduce.fmin.v4f64(<4 x double> undef)
99 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 118 for instruction: %fmin_v4f128 = call reassoc fp128 @llvm.vector.reduce.fmin.v4f128(<4 x fp128> undef)
100 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
102 %fmin_v2f16 = call reassoc half @llvm.vector.reduce.fmin.v2f16(<2 x half> undef)
103 %fmin_v4f16 = call reassoc half @llvm.vector.reduce.fmin.v4f16(<4 x half> undef)
104 %fmin_v8f16 = call reassoc half @llvm.vector.reduce.fmin.v8f16(<8 x half> undef)
105 %fmin_v16f16 = call reassoc half @llvm.vector.reduce.fmin.v16f16(<16 x half> undef)
106 %fmin_v2f32 = call reassoc float @llvm.vector.reduce.fmin.v2f32(<2 x float> undef)
107 %fmin_v4f32 = call reassoc float @llvm.vector.reduce.fmin.v4f32(<4 x float> undef)
108 %fmin_v8f32 = call reassoc float @llvm.vector.reduce.fmin.v8f32(<8 x float> undef)
109 %fmin_v2f64 = call reassoc double @llvm.vector.reduce.fmin.v2f64(<2 x double> undef)
110 %fmin_v4f64 = call reassoc double @llvm.vector.reduce.fmin.v4f64(<4 x double> undef)
111 %fmin_v4f128 = call reassoc fp128 @llvm.vector.reduce.fmin.v4f128(<4 x fp128> undef)
115 define void @fmax_strict() {
116 ; CHECK-V8-LABEL: 'fmax_strict'
117 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %fmax_v2f16 = call half @llvm.vector.reduce.fmax.v2f16(<2 x half> undef)
118 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %fmax_v4f16 = call half @llvm.vector.reduce.fmax.v4f16(<4 x half> undef)
119 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 43 for instruction: %fmax_v8f16 = call half @llvm.vector.reduce.fmax.v8f16(<8 x half> undef)
120 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 91 for instruction: %fmax_v16f16 = call half @llvm.vector.reduce.fmax.v16f16(<16 x half> undef)
121 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %fmax_v2f32 = call float @llvm.vector.reduce.fmax.v2f32(<2 x float> undef)
122 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %fmax_v4f32 = call float @llvm.vector.reduce.fmax.v4f32(<4 x float> undef)
123 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %fmax_v8f32 = call float @llvm.vector.reduce.fmax.v8f32(<8 x float> undef)
124 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %fmax_v2f64 = call double @llvm.vector.reduce.fmax.v2f64(<2 x double> undef)
125 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %fmax_v4f64 = call double @llvm.vector.reduce.fmax.v4f64(<4 x double> undef)
126 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 94 for instruction: %fmax_v4f128 = call fp128 @llvm.vector.reduce.fmax.v4f128(<4 x fp128> undef)
127 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
129 ; CHECK-MVEFP-LABEL: 'fmax_strict'
130 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %fmax_v2f16 = call half @llvm.vector.reduce.fmax.v2f16(<2 x half> undef)
131 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %fmax_v4f16 = call half @llvm.vector.reduce.fmax.v4f16(<4 x half> undef)
132 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %fmax_v8f16 = call half @llvm.vector.reduce.fmax.v8f16(<8 x half> undef)
133 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %fmax_v16f16 = call half @llvm.vector.reduce.fmax.v16f16(<16 x half> undef)
134 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %fmax_v2f32 = call float @llvm.vector.reduce.fmax.v2f32(<2 x float> undef)
135 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %fmax_v4f32 = call float @llvm.vector.reduce.fmax.v4f32(<4 x float> undef)
136 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %fmax_v8f32 = call float @llvm.vector.reduce.fmax.v8f32(<8 x float> undef)
137 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 35 for instruction: %fmax_v2f64 = call double @llvm.vector.reduce.fmax.v2f64(<2 x double> undef)
138 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 69 for instruction: %fmax_v4f64 = call double @llvm.vector.reduce.fmax.v4f64(<4 x double> undef)
139 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 118 for instruction: %fmax_v4f128 = call fp128 @llvm.vector.reduce.fmax.v4f128(<4 x fp128> undef)
140 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
142 ; CHECK-MVEI-LABEL: 'fmax_strict'
143 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 35 for instruction: %fmax_v2f16 = call half @llvm.vector.reduce.fmax.v2f16(<2 x half> undef)
144 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 137 for instruction: %fmax_v4f16 = call half @llvm.vector.reduce.fmax.v4f16(<4 x half> undef)
145 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 409 for instruction: %fmax_v8f16 = call half @llvm.vector.reduce.fmax.v8f16(<8 x half> undef)
146 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 545 for instruction: %fmax_v16f16 = call half @llvm.vector.reduce.fmax.v16f16(<16 x half> undef)
147 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 35 for instruction: %fmax_v2f32 = call float @llvm.vector.reduce.fmax.v2f32(<2 x float> undef)
148 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 137 for instruction: %fmax_v4f32 = call float @llvm.vector.reduce.fmax.v4f32(<4 x float> undef)
149 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 205 for instruction: %fmax_v8f32 = call float @llvm.vector.reduce.fmax.v8f32(<8 x float> undef)
150 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 35 for instruction: %fmax_v2f64 = call double @llvm.vector.reduce.fmax.v2f64(<2 x double> undef)
151 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 69 for instruction: %fmax_v4f64 = call double @llvm.vector.reduce.fmax.v4f64(<4 x double> undef)
152 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 118 for instruction: %fmax_v4f128 = call fp128 @llvm.vector.reduce.fmax.v4f128(<4 x fp128> undef)
153 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
155 %fmax_v2f16 = call half @llvm.vector.reduce.fmax.v2f16(<2 x half> undef)
156 %fmax_v4f16 = call half @llvm.vector.reduce.fmax.v4f16(<4 x half> undef)
157 %fmax_v8f16 = call half @llvm.vector.reduce.fmax.v8f16(<8 x half> undef)
158 %fmax_v16f16 = call half @llvm.vector.reduce.fmax.v16f16(<16 x half> undef)
159 %fmax_v2f32 = call float @llvm.vector.reduce.fmax.v2f32(<2 x float> undef)
160 %fmax_v4f32 = call float @llvm.vector.reduce.fmax.v4f32(<4 x float> undef)
161 %fmax_v8f32 = call float @llvm.vector.reduce.fmax.v8f32(<8 x float> undef)
162 %fmax_v2f64 = call double @llvm.vector.reduce.fmax.v2f64(<2 x double> undef)
163 %fmax_v4f64 = call double @llvm.vector.reduce.fmax.v4f64(<4 x double> undef)
164 %fmax_v4f128 = call fp128 @llvm.vector.reduce.fmax.v4f128(<4 x fp128> undef)
169 define void @fmax_unordered() {
170 ; CHECK-V8-LABEL: 'fmax_unordered'
171 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %fmax_v2f16 = call reassoc half @llvm.vector.reduce.fmax.v2f16(<2 x half> undef)
172 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %fmax_v4f16 = call reassoc half @llvm.vector.reduce.fmax.v4f16(<4 x half> undef)
173 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 43 for instruction: %fmax_v8f16 = call reassoc half @llvm.vector.reduce.fmax.v8f16(<8 x half> undef)
174 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 91 for instruction: %fmax_v16f16 = call reassoc half @llvm.vector.reduce.fmax.v16f16(<16 x half> undef)
175 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %fmax_v2f32 = call reassoc float @llvm.vector.reduce.fmax.v2f32(<2 x float> undef)
176 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %fmax_v4f32 = call reassoc float @llvm.vector.reduce.fmax.v4f32(<4 x float> undef)
177 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %fmax_v8f32 = call reassoc float @llvm.vector.reduce.fmax.v8f32(<8 x float> undef)
178 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %fmax_v2f64 = call reassoc double @llvm.vector.reduce.fmax.v2f64(<2 x double> undef)
179 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %fmax_v4f64 = call reassoc double @llvm.vector.reduce.fmax.v4f64(<4 x double> undef)
180 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 94 for instruction: %fmax_v4f128 = call reassoc fp128 @llvm.vector.reduce.fmax.v4f128(<4 x fp128> undef)
181 ; CHECK-V8-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
183 ; CHECK-MVEFP-LABEL: 'fmax_unordered'
184 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %fmax_v2f16 = call reassoc half @llvm.vector.reduce.fmax.v2f16(<2 x half> undef)
185 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %fmax_v4f16 = call reassoc half @llvm.vector.reduce.fmax.v4f16(<4 x half> undef)
186 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %fmax_v8f16 = call reassoc half @llvm.vector.reduce.fmax.v8f16(<8 x half> undef)
187 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %fmax_v16f16 = call reassoc half @llvm.vector.reduce.fmax.v16f16(<16 x half> undef)
188 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %fmax_v2f32 = call reassoc float @llvm.vector.reduce.fmax.v2f32(<2 x float> undef)
189 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %fmax_v4f32 = call reassoc float @llvm.vector.reduce.fmax.v4f32(<4 x float> undef)
190 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %fmax_v8f32 = call reassoc float @llvm.vector.reduce.fmax.v8f32(<8 x float> undef)
191 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 35 for instruction: %fmax_v2f64 = call reassoc double @llvm.vector.reduce.fmax.v2f64(<2 x double> undef)
192 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 69 for instruction: %fmax_v4f64 = call reassoc double @llvm.vector.reduce.fmax.v4f64(<4 x double> undef)
193 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 118 for instruction: %fmax_v4f128 = call reassoc fp128 @llvm.vector.reduce.fmax.v4f128(<4 x fp128> undef)
194 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
196 ; CHECK-MVEI-LABEL: 'fmax_unordered'
197 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 35 for instruction: %fmax_v2f16 = call reassoc half @llvm.vector.reduce.fmax.v2f16(<2 x half> undef)
198 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 137 for instruction: %fmax_v4f16 = call reassoc half @llvm.vector.reduce.fmax.v4f16(<4 x half> undef)
199 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 409 for instruction: %fmax_v8f16 = call reassoc half @llvm.vector.reduce.fmax.v8f16(<8 x half> undef)
200 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 545 for instruction: %fmax_v16f16 = call reassoc half @llvm.vector.reduce.fmax.v16f16(<16 x half> undef)
201 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 35 for instruction: %fmax_v2f32 = call reassoc float @llvm.vector.reduce.fmax.v2f32(<2 x float> undef)
202 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 137 for instruction: %fmax_v4f32 = call reassoc float @llvm.vector.reduce.fmax.v4f32(<4 x float> undef)
203 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 205 for instruction: %fmax_v8f32 = call reassoc float @llvm.vector.reduce.fmax.v8f32(<8 x float> undef)
204 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 35 for instruction: %fmax_v2f64 = call reassoc double @llvm.vector.reduce.fmax.v2f64(<2 x double> undef)
205 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 69 for instruction: %fmax_v4f64 = call reassoc double @llvm.vector.reduce.fmax.v4f64(<4 x double> undef)
206 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 118 for instruction: %fmax_v4f128 = call reassoc fp128 @llvm.vector.reduce.fmax.v4f128(<4 x fp128> undef)
207 ; CHECK-MVEI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
209 %fmax_v2f16 = call reassoc half @llvm.vector.reduce.fmax.v2f16(<2 x half> undef)
210 %fmax_v4f16 = call reassoc half @llvm.vector.reduce.fmax.v4f16(<4 x half> undef)
211 %fmax_v8f16 = call reassoc half @llvm.vector.reduce.fmax.v8f16(<8 x half> undef)
212 %fmax_v16f16 = call reassoc half @llvm.vector.reduce.fmax.v16f16(<16 x half> undef)
213 %fmax_v2f32 = call reassoc float @llvm.vector.reduce.fmax.v2f32(<2 x float> undef)
214 %fmax_v4f32 = call reassoc float @llvm.vector.reduce.fmax.v4f32(<4 x float> undef)
215 %fmax_v8f32 = call reassoc float @llvm.vector.reduce.fmax.v8f32(<8 x float> undef)
216 %fmax_v2f64 = call reassoc double @llvm.vector.reduce.fmax.v2f64(<2 x double> undef)
217 %fmax_v4f64 = call reassoc double @llvm.vector.reduce.fmax.v4f64(<4 x double> undef)
218 %fmax_v4f128 = call reassoc fp128 @llvm.vector.reduce.fmax.v4f128(<4 x fp128> undef)
223 declare half @llvm.vector.reduce.fmin.v2f16(<2 x half>)
224 declare half @llvm.vector.reduce.fmin.v4f16(<4 x half>)
225 declare half @llvm.vector.reduce.fmin.v8f16(<8 x half>)
226 declare half @llvm.vector.reduce.fmin.v16f16(<16 x half>)
227 declare float @llvm.vector.reduce.fmin.v2f32(<2 x float>)
228 declare float @llvm.vector.reduce.fmin.v4f32(<4 x float>)
229 declare float @llvm.vector.reduce.fmin.v8f32(<8 x float>)
230 declare double @llvm.vector.reduce.fmin.v2f64(<2 x double>)
231 declare double @llvm.vector.reduce.fmin.v4f64(<4 x double>)
232 declare fp128 @llvm.vector.reduce.fmin.v4f128(<4 x fp128>)
235 declare half @llvm.vector.reduce.fmax.v2f16(<2 x half>)
236 declare half @llvm.vector.reduce.fmax.v4f16(<4 x half>)
237 declare half @llvm.vector.reduce.fmax.v8f16(<8 x half>)
238 declare half @llvm.vector.reduce.fmax.v16f16(<16 x half>)
239 declare float @llvm.vector.reduce.fmax.v2f32(<2 x float>)
240 declare float @llvm.vector.reduce.fmax.v4f32(<4 x float>)
241 declare float @llvm.vector.reduce.fmax.v8f32(<8 x float>)
242 declare double @llvm.vector.reduce.fmax.v2f64(<2 x double>)
243 declare double @llvm.vector.reduce.fmax.v4f64(<4 x double>)
244 declare fp128 @llvm.vector.reduce.fmax.v4f128(<4 x fp128>)