4
4
5
5
define i32 @reduce_umin_i1 (i32 %arg ) {
6
6
; CHECK-LABEL: 'reduce_umin_i1'
7
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i1 @llvm.vector.reduce.umax.v1i1(<1 x i1> undef)
7
+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V1 = call i1 @llvm.vector.reduce.umax.v1i1(<1 x i1> undef)
8
8
; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V2 = call i1 @llvm.vector.reduce.umax.v2i1(<2 x i1> undef)
9
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4 = call i1 @llvm.vector.reduce.umax.v4i1(<4 x i1> undef)
10
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %V8 = call i1 @llvm.vector.reduce.umax.v8i1(<8 x i1> undef)
11
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V16 = call i1 @llvm.vector.reduce.umax.v16i1(<16 x i1> undef)
12
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V32 = call i1 @llvm.vector.reduce.umax.v32i1(<32 x i1> undef)
13
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V64 = call i1 @llvm.vector.reduce.umax.v64i1(<64 x i1> undef)
14
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V128 = call i1 @llvm.vector.reduce.umax.v128i1(<128 x i1> undef)
9
+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V4 = call i1 @llvm.vector.reduce.umax.v4i1(<4 x i1> undef)
10
+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V8 = call i1 @llvm.vector.reduce.umax.v8i1(<8 x i1> undef)
11
+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V16 = call i1 @llvm.vector.reduce.umax.v16i1(<16 x i1> undef)
12
+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V32 = call i1 @llvm.vector.reduce.umax.v32i1(<32 x i1> undef)
13
+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V64 = call i1 @llvm.vector.reduce.umax.v64i1(<64 x i1> undef)
14
+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V128 = call i1 @llvm.vector.reduce.umax.v128i1(<128 x i1> undef)
15
15
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef
16
+ ;
16
17
%V1 = call i1 @llvm.vector.reduce.umax.v1i1 (<1 x i1 > undef )
17
18
%V2 = call i1 @llvm.vector.reduce.umax.v2i1 (<2 x i1 > undef )
18
19
%V4 = call i1 @llvm.vector.reduce.umax.v4i1 (<4 x i1 > undef )
@@ -35,6 +36,7 @@ define i32 @reduce_umax_i8(i32 %arg) {
35
36
; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V64 = call i8 @llvm.vector.reduce.umax.v64i8(<64 x i8> undef)
36
37
; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V128 = call i8 @llvm.vector.reduce.umax.v128i8(<128 x i8> undef)
37
38
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef
39
+ ;
38
40
%V1 = call i8 @llvm.vector.reduce.umax.v1i8 (<1 x i8 > undef )
39
41
%V2 = call i8 @llvm.vector.reduce.umax.v2i8 (<2 x i8 > undef )
40
42
%V4 = call i8 @llvm.vector.reduce.umax.v4i8 (<4 x i8 > undef )
@@ -57,6 +59,7 @@ define i32 @reduce_umax_i16(i32 %arg) {
57
59
; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V64 = call i16 @llvm.vector.reduce.umax.v64i16(<64 x i16> undef)
58
60
; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V128 = call i16 @llvm.vector.reduce.umax.v128i16(<128 x i16> undef)
59
61
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef
62
+ ;
60
63
%V1 = call i16 @llvm.vector.reduce.umax.v1i16 (<1 x i16 > undef )
61
64
%V2 = call i16 @llvm.vector.reduce.umax.v2i16 (<2 x i16 > undef )
62
65
%V4 = call i16 @llvm.vector.reduce.umax.v4i16 (<4 x i16 > undef )
@@ -79,6 +82,7 @@ define i32 @reduce_umax_i32(i32 %arg) {
79
82
; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V64 = call i32 @llvm.vector.reduce.umax.v64i32(<64 x i32> undef)
80
83
; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %V128 = call i32 @llvm.vector.reduce.umax.v128i32(<128 x i32> undef)
81
84
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef
85
+ ;
82
86
%V1 = call i32 @llvm.vector.reduce.umax.v1i32 (<1 x i32 > undef )
83
87
%V2 = call i32 @llvm.vector.reduce.umax.v2i32 (<2 x i32 > undef )
84
88
%V4 = call i32 @llvm.vector.reduce.umax.v4i32 (<4 x i32 > undef )
@@ -101,6 +105,7 @@ define i32 @reduce_umax_i64(i32 %arg) {
101
105
; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V64 = call i64 @llvm.vector.reduce.umax.v64i64(<64 x i64> undef)
102
106
; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V128 = call i64 @llvm.vector.reduce.umax.v128i64(<128 x i64> undef)
103
107
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef
108
+ ;
104
109
%V1 = call i64 @llvm.vector.reduce.umax.v1i64 (<1 x i64 > undef )
105
110
%V2 = call i64 @llvm.vector.reduce.umax.v2i64 (<2 x i64 > undef )
106
111
%V4 = call i64 @llvm.vector.reduce.umax.v4i64 (<4 x i64 > undef )
@@ -114,15 +119,16 @@ define i32 @reduce_umax_i64(i32 %arg) {
114
119
115
120
define i32 @reduce_smin_i1 (i32 %arg ) {
116
121
; CHECK-LABEL: 'reduce_smin_i1'
117
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i1 @llvm.vector.reduce.smax.v1i1(<1 x i1> undef)
122
+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V1 = call i1 @llvm.vector.reduce.smax.v1i1(<1 x i1> undef)
118
123
; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V2 = call i1 @llvm.vector.reduce.smax.v2i1(<2 x i1> undef)
119
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4 = call i1 @llvm.vector.reduce.smax.v4i1(<4 x i1> undef)
120
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %V8 = call i1 @llvm.vector.reduce.smax.v8i1(<8 x i1> undef)
121
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V16 = call i1 @llvm.vector.reduce.smax.v16i1(<16 x i1> undef)
122
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V32 = call i1 @llvm.vector.reduce.smax.v32i1(<32 x i1> undef)
123
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V64 = call i1 @llvm.vector.reduce.smax.v64i1(<64 x i1> undef)
124
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V128 = call i1 @llvm.vector.reduce.smax.v128i1(<128 x i1> undef)
124
+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V4 = call i1 @llvm.vector.reduce.smax.v4i1(<4 x i1> undef)
125
+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V8 = call i1 @llvm.vector.reduce.smax.v8i1(<8 x i1> undef)
126
+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V16 = call i1 @llvm.vector.reduce.smax.v16i1(<16 x i1> undef)
127
+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V32 = call i1 @llvm.vector.reduce.smax.v32i1(<32 x i1> undef)
128
+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V64 = call i1 @llvm.vector.reduce.smax.v64i1(<64 x i1> undef)
129
+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V128 = call i1 @llvm.vector.reduce.smax.v128i1(<128 x i1> undef)
125
130
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef
131
+ ;
126
132
%V1 = call i1 @llvm.vector.reduce.smax.v1i1 (<1 x i1 > undef )
127
133
%V2 = call i1 @llvm.vector.reduce.smax.v2i1 (<2 x i1 > undef )
128
134
%V4 = call i1 @llvm.vector.reduce.smax.v4i1 (<4 x i1 > undef )
@@ -145,6 +151,7 @@ define i32 @reduce_smax_i8(i32 %arg) {
145
151
; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V64 = call i8 @llvm.vector.reduce.smax.v64i8(<64 x i8> undef)
146
152
; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V128 = call i8 @llvm.vector.reduce.smax.v128i8(<128 x i8> undef)
147
153
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef
154
+ ;
148
155
%V1 = call i8 @llvm.vector.reduce.smax.v1i8 (<1 x i8 > undef )
149
156
%V2 = call i8 @llvm.vector.reduce.smax.v2i8 (<2 x i8 > undef )
150
157
%V4 = call i8 @llvm.vector.reduce.smax.v4i8 (<4 x i8 > undef )
@@ -167,6 +174,7 @@ define i32 @reduce_smax_i16(i32 %arg) {
167
174
; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V64 = call i16 @llvm.vector.reduce.smax.v64i16(<64 x i16> undef)
168
175
; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V128 = call i16 @llvm.vector.reduce.smax.v128i16(<128 x i16> undef)
169
176
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef
177
+ ;
170
178
%V1 = call i16 @llvm.vector.reduce.smax.v1i16 (<1 x i16 > undef )
171
179
%V2 = call i16 @llvm.vector.reduce.smax.v2i16 (<2 x i16 > undef )
172
180
%V4 = call i16 @llvm.vector.reduce.smax.v4i16 (<4 x i16 > undef )
@@ -189,6 +197,7 @@ define i32 @reduce_smax_i32(i32 %arg) {
189
197
; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V64 = call i32 @llvm.vector.reduce.smax.v64i32(<64 x i32> undef)
190
198
; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %V128 = call i32 @llvm.vector.reduce.smax.v128i32(<128 x i32> undef)
191
199
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef
200
+ ;
192
201
%V1 = call i32 @llvm.vector.reduce.smax.v1i32 (<1 x i32 > undef )
193
202
%V2 = call i32 @llvm.vector.reduce.smax.v2i32 (<2 x i32 > undef )
194
203
%V4 = call i32 @llvm.vector.reduce.smax.v4i32 (<4 x i32 > undef )
@@ -211,6 +220,7 @@ define i32 @reduce_smax_i64(i32 %arg) {
211
220
; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V64 = call i64 @llvm.vector.reduce.smax.v64i64(<64 x i64> undef)
212
221
; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V128 = call i64 @llvm.vector.reduce.smax.v128i64(<128 x i64> undef)
213
222
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef
223
+ ;
214
224
%V1 = call i64 @llvm.vector.reduce.smax.v1i64 (<1 x i64 > undef )
215
225
%V2 = call i64 @llvm.vector.reduce.smax.v2i64 (<2 x i64 > undef )
216
226
%V4 = call i64 @llvm.vector.reduce.smax.v4i64 (<4 x i64 > undef )
0 commit comments