xref: /llvm-project/llvm/test/Analysis/CostModel/RISCV/reduce-min.ll (revision 369c61744a435c52e3564398d9972fa556db022b)
1ae7c6647SYeting Kuo; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
2400b725cSLuke Lau; RUN: opt < %s -mtriple=riscv32 -mattr=+v -passes="print<cost-model>" -cost-kind=throughput 2>&1 -disable-output | FileCheck %s
3400b725cSLuke Lau; RUN: opt < %s -mtriple=riscv64 -mattr=+v -passes="print<cost-model>" -cost-kind=throughput 2>&1 -disable-output | FileCheck %s
4400b725cSLuke Lau; RUN: opt < %s -mtriple=riscv32 -mattr=+v -passes="print<cost-model>" -cost-kind=code-size 2>&1 -disable-output | FileCheck %s --check-prefix=SIZE
5400b725cSLuke Lau; RUN: opt < %s -mtriple=riscv64 -mattr=+v -passes="print<cost-model>" -cost-kind=code-size 2>&1 -disable-output | FileCheck %s --check-prefix=SIZE
6ae7c6647SYeting Kuo
72b83467dSPhilip Reamesdefine i32 @reduce_umin_i1(i32 %arg) {
82247e4deSPhilip Reames; CHECK-LABEL: 'reduce_umin_i1'
9*369c6174SShao-Ce SUN; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i1 @llvm.vector.reduce.umin.v1i1(<1 x i1> undef)
102247e4deSPhilip Reames; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %V2 = call i1 @llvm.vector.reduce.umin.v2i1(<2 x i1> undef)
11536095a2SPhilip Reames; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %V4 = call i1 @llvm.vector.reduce.umin.v4i1(<4 x i1> undef)
12536095a2SPhilip Reames; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %V8 = call i1 @llvm.vector.reduce.umin.v8i1(<8 x i1> undef)
13536095a2SPhilip Reames; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %V16 = call i1 @llvm.vector.reduce.umin.v16i1(<16 x i1> undef)
14536095a2SPhilip Reames; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %V32 = call i1 @llvm.vector.reduce.umin.v32i1(<32 x i1> undef)
15536095a2SPhilip Reames; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %V64 = call i1 @llvm.vector.reduce.umin.v64i1(<64 x i1> undef)
16536095a2SPhilip Reames; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %V128 = call i1 @llvm.vector.reduce.umin.v128i1(<128 x i1> undef)
170a5d52a7SSergey Kachkov; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
18536095a2SPhilip Reames;
19fb661e25SShihPo Hung; SIZE-LABEL: 'reduce_umin_i1'
20*369c6174SShao-Ce SUN; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i1 @llvm.vector.reduce.umin.v1i1(<1 x i1> undef)
21fb661e25SShihPo Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %V2 = call i1 @llvm.vector.reduce.umin.v2i1(<2 x i1> undef)
22fb661e25SShihPo Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %V4 = call i1 @llvm.vector.reduce.umin.v4i1(<4 x i1> undef)
23fb661e25SShihPo Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %V8 = call i1 @llvm.vector.reduce.umin.v8i1(<8 x i1> undef)
24fb661e25SShihPo Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %V16 = call i1 @llvm.vector.reduce.umin.v16i1(<16 x i1> undef)
25fb661e25SShihPo Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %V32 = call i1 @llvm.vector.reduce.umin.v32i1(<32 x i1> undef)
26fb661e25SShihPo Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %V64 = call i1 @llvm.vector.reduce.umin.v64i1(<64 x i1> undef)
27fb661e25SShihPo Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %V128 = call i1 @llvm.vector.reduce.umin.v128i1(<128 x i1> undef)
28fb661e25SShihPo Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef
29fb661e25SShihPo Hung;
302b83467dSPhilip Reames  %V1   = call i1 @llvm.vector.reduce.umin.v1i1(<1 x i1> undef)
312b83467dSPhilip Reames  %V2   = call i1 @llvm.vector.reduce.umin.v2i1(<2 x i1> undef)
322b83467dSPhilip Reames  %V4   = call i1 @llvm.vector.reduce.umin.v4i1(<4 x i1> undef)
332b83467dSPhilip Reames  %V8   = call i1 @llvm.vector.reduce.umin.v8i1(<8 x i1> undef)
342b83467dSPhilip Reames  %V16  = call i1 @llvm.vector.reduce.umin.v16i1(<16 x i1> undef)
352b83467dSPhilip Reames  %V32  = call i1 @llvm.vector.reduce.umin.v32i1(<32 x i1> undef)
362b83467dSPhilip Reames  %V64  = call i1 @llvm.vector.reduce.umin.v64i1(<64 x i1> undef)
372b83467dSPhilip Reames  %V128 = call i1 @llvm.vector.reduce.umin.v128i1(<128 x i1> undef)
382b83467dSPhilip Reames  ret i32 undef
392b83467dSPhilip Reames}
402b83467dSPhilip Reames
41ae7c6647SYeting Kuodefine i32 @reduce_umin_i8(i32 %arg) {
422247e4deSPhilip Reames; CHECK-LABEL: 'reduce_umin_i8'
4346829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %V1 = call i8 @llvm.vector.reduce.umin.v1i8(<1 x i8> undef)
4446829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V2 = call i8 @llvm.vector.reduce.umin.v2i8(<2 x i8> undef)
4546829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %V4 = call i8 @llvm.vector.reduce.umin.v4i8(<4 x i8> undef)
4646829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %V8 = call i8 @llvm.vector.reduce.umin.v8i8(<8 x i8> undef)
4746829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %V16 = call i8 @llvm.vector.reduce.umin.v16i8(<16 x i8> undef)
4846829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %V32 = call i8 @llvm.vector.reduce.umin.v32i8(<32 x i8> undef)
4946829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %V64 = call i8 @llvm.vector.reduce.umin.v64i8(<64 x i8> undef)
5046829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %V128 = call i8 @llvm.vector.reduce.umin.v128i8(<128 x i8> undef)
510a5d52a7SSergey Kachkov; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
52536095a2SPhilip Reames;
53fb661e25SShihPo Hung; SIZE-LABEL: 'reduce_umin_i8'
5446829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i8 @llvm.vector.reduce.umin.v1i8(<1 x i8> undef)
5546829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V2 = call i8 @llvm.vector.reduce.umin.v2i8(<2 x i8> undef)
5646829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V4 = call i8 @llvm.vector.reduce.umin.v4i8(<4 x i8> undef)
5746829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V8 = call i8 @llvm.vector.reduce.umin.v8i8(<8 x i8> undef)
5846829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V16 = call i8 @llvm.vector.reduce.umin.v16i8(<16 x i8> undef)
5946829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V32 = call i8 @llvm.vector.reduce.umin.v32i8(<32 x i8> undef)
6046829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V64 = call i8 @llvm.vector.reduce.umin.v64i8(<64 x i8> undef)
6146829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V128 = call i8 @llvm.vector.reduce.umin.v128i8(<128 x i8> undef)
62fb661e25SShihPo Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef
63fb661e25SShihPo Hung;
64ae7c6647SYeting Kuo  %V1   = call i8 @llvm.vector.reduce.umin.v1i8(<1 x i8> undef)
65ae7c6647SYeting Kuo  %V2   = call i8 @llvm.vector.reduce.umin.v2i8(<2 x i8> undef)
66ae7c6647SYeting Kuo  %V4   = call i8 @llvm.vector.reduce.umin.v4i8(<4 x i8> undef)
67ae7c6647SYeting Kuo  %V8   = call i8 @llvm.vector.reduce.umin.v8i8(<8 x i8> undef)
68ae7c6647SYeting Kuo  %V16  = call i8 @llvm.vector.reduce.umin.v16i8(<16 x i8> undef)
69ae7c6647SYeting Kuo  %V32  = call i8 @llvm.vector.reduce.umin.v32i8(<32 x i8> undef)
70ae7c6647SYeting Kuo  %V64  = call i8 @llvm.vector.reduce.umin.v64i8(<64 x i8> undef)
71ae7c6647SYeting Kuo  %V128 = call i8 @llvm.vector.reduce.umin.v128i8(<128 x i8> undef)
72ae7c6647SYeting Kuo  ret i32 undef
73ae7c6647SYeting Kuo}
74ae7c6647SYeting Kuo
75ae7c6647SYeting Kuodefine i32 @reduce_umin_i16(i32 %arg) {
762247e4deSPhilip Reames; CHECK-LABEL: 'reduce_umin_i16'
7746829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %V1 = call i16 @llvm.vector.reduce.umin.v1i16(<1 x i16> undef)
7846829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V2 = call i16 @llvm.vector.reduce.umin.v2i16(<2 x i16> undef)
7946829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %V4 = call i16 @llvm.vector.reduce.umin.v4i16(<4 x i16> undef)
8046829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %V8 = call i16 @llvm.vector.reduce.umin.v8i16(<8 x i16> undef)
8146829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %V16 = call i16 @llvm.vector.reduce.umin.v16i16(<16 x i16> undef)
8246829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %V32 = call i16 @llvm.vector.reduce.umin.v32i16(<32 x i16> undef)
8346829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %V64 = call i16 @llvm.vector.reduce.umin.v64i16(<64 x i16> undef)
8446829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 15 for instruction: %V128 = call i16 @llvm.vector.reduce.umin.v128i16(<128 x i16> undef)
850a5d52a7SSergey Kachkov; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
86536095a2SPhilip Reames;
87fb661e25SShihPo Hung; SIZE-LABEL: 'reduce_umin_i16'
8846829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i16 @llvm.vector.reduce.umin.v1i16(<1 x i16> undef)
8946829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V2 = call i16 @llvm.vector.reduce.umin.v2i16(<2 x i16> undef)
9046829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V4 = call i16 @llvm.vector.reduce.umin.v4i16(<4 x i16> undef)
9146829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V8 = call i16 @llvm.vector.reduce.umin.v8i16(<8 x i16> undef)
9246829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V16 = call i16 @llvm.vector.reduce.umin.v16i16(<16 x i16> undef)
9346829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V32 = call i16 @llvm.vector.reduce.umin.v32i16(<32 x i16> undef)
9446829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V64 = call i16 @llvm.vector.reduce.umin.v64i16(<64 x i16> undef)
9546829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %V128 = call i16 @llvm.vector.reduce.umin.v128i16(<128 x i16> undef)
96fb661e25SShihPo Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef
97fb661e25SShihPo Hung;
98ae7c6647SYeting Kuo  %V1   = call i16 @llvm.vector.reduce.umin.v1i16(<1 x i16> undef)
99ae7c6647SYeting Kuo  %V2   = call i16 @llvm.vector.reduce.umin.v2i16(<2 x i16> undef)
100ae7c6647SYeting Kuo  %V4   = call i16 @llvm.vector.reduce.umin.v4i16(<4 x i16> undef)
101ae7c6647SYeting Kuo  %V8   = call i16 @llvm.vector.reduce.umin.v8i16(<8 x i16> undef)
102ae7c6647SYeting Kuo  %V16  = call i16 @llvm.vector.reduce.umin.v16i16(<16 x i16> undef)
103ae7c6647SYeting Kuo  %V32  = call i16 @llvm.vector.reduce.umin.v32i16(<32 x i16> undef)
104ae7c6647SYeting Kuo  %V64  = call i16 @llvm.vector.reduce.umin.v64i16(<64 x i16> undef)
105ae7c6647SYeting Kuo  %V128 = call i16 @llvm.vector.reduce.umin.v128i16(<128 x i16> undef)
106ae7c6647SYeting Kuo  ret i32 undef
107ae7c6647SYeting Kuo}
108ae7c6647SYeting Kuo
109ae7c6647SYeting Kuodefine i32 @reduce_umin_i32(i32 %arg) {
1102247e4deSPhilip Reames; CHECK-LABEL: 'reduce_umin_i32'
11146829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %V1 = call i32 @llvm.vector.reduce.umin.v1i32(<1 x i32> undef)
11246829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V2 = call i32 @llvm.vector.reduce.umin.v2i32(<2 x i32> undef)
11346829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %V4 = call i32 @llvm.vector.reduce.umin.v4i32(<4 x i32> undef)
11446829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %V8 = call i32 @llvm.vector.reduce.umin.v8i32(<8 x i32> undef)
11546829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %V16 = call i32 @llvm.vector.reduce.umin.v16i32(<16 x i32> undef)
11646829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %V32 = call i32 @llvm.vector.reduce.umin.v32i32(<32 x i32> undef)
11746829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %V64 = call i32 @llvm.vector.reduce.umin.v64i32(<64 x i32> undef)
11846829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 30 for instruction: %V128 = call i32 @llvm.vector.reduce.umin.v128i32(<128 x i32> undef)
1190a5d52a7SSergey Kachkov; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
120536095a2SPhilip Reames;
121fb661e25SShihPo Hung; SIZE-LABEL: 'reduce_umin_i32'
12246829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i32 @llvm.vector.reduce.umin.v1i32(<1 x i32> undef)
12346829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V2 = call i32 @llvm.vector.reduce.umin.v2i32(<2 x i32> undef)
12446829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V4 = call i32 @llvm.vector.reduce.umin.v4i32(<4 x i32> undef)
12546829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V8 = call i32 @llvm.vector.reduce.umin.v8i32(<8 x i32> undef)
12646829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V16 = call i32 @llvm.vector.reduce.umin.v16i32(<16 x i32> undef)
12746829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V32 = call i32 @llvm.vector.reduce.umin.v32i32(<32 x i32> undef)
12846829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %V64 = call i32 @llvm.vector.reduce.umin.v64i32(<64 x i32> undef)
12946829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %V128 = call i32 @llvm.vector.reduce.umin.v128i32(<128 x i32> undef)
130fb661e25SShihPo Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef
131fb661e25SShihPo Hung;
132ae7c6647SYeting Kuo  %V1   = call i32 @llvm.vector.reduce.umin.v1i32(<1 x i32> undef)
133ae7c6647SYeting Kuo  %V2   = call i32 @llvm.vector.reduce.umin.v2i32(<2 x i32> undef)
134ae7c6647SYeting Kuo  %V4   = call i32 @llvm.vector.reduce.umin.v4i32(<4 x i32> undef)
135ae7c6647SYeting Kuo  %V8   = call i32 @llvm.vector.reduce.umin.v8i32(<8 x i32> undef)
136ae7c6647SYeting Kuo  %V16  = call i32 @llvm.vector.reduce.umin.v16i32(<16 x i32> undef)
137ae7c6647SYeting Kuo  %V32  = call i32 @llvm.vector.reduce.umin.v32i32(<32 x i32> undef)
138ae7c6647SYeting Kuo  %V64  = call i32 @llvm.vector.reduce.umin.v64i32(<64 x i32> undef)
139ae7c6647SYeting Kuo  %V128 = call i32 @llvm.vector.reduce.umin.v128i32(<128 x i32> undef)
140ae7c6647SYeting Kuo  ret i32 undef
141ae7c6647SYeting Kuo}
142ae7c6647SYeting Kuo
143ae7c6647SYeting Kuodefine i32 @reduce_umin_i64(i32 %arg) {
1442247e4deSPhilip Reames; CHECK-LABEL: 'reduce_umin_i64'
14546829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %V1 = call i64 @llvm.vector.reduce.umin.v1i64(<1 x i64> undef)
14646829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V2 = call i64 @llvm.vector.reduce.umin.v2i64(<2 x i64> undef)
14746829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %V4 = call i64 @llvm.vector.reduce.umin.v4i64(<4 x i64> undef)
14846829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %V8 = call i64 @llvm.vector.reduce.umin.v8i64(<8 x i64> undef)
14946829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %V16 = call i64 @llvm.vector.reduce.umin.v16i64(<16 x i64> undef)
15046829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 13 for instruction: %V32 = call i64 @llvm.vector.reduce.umin.v32i64(<32 x i64> undef)
15146829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 29 for instruction: %V64 = call i64 @llvm.vector.reduce.umin.v64i64(<64 x i64> undef)
15246829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 61 for instruction: %V128 = call i64 @llvm.vector.reduce.umin.v128i64(<128 x i64> undef)
1530a5d52a7SSergey Kachkov; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
154536095a2SPhilip Reames;
155fb661e25SShihPo Hung; SIZE-LABEL: 'reduce_umin_i64'
15646829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i64 @llvm.vector.reduce.umin.v1i64(<1 x i64> undef)
15746829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V2 = call i64 @llvm.vector.reduce.umin.v2i64(<2 x i64> undef)
15846829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V4 = call i64 @llvm.vector.reduce.umin.v4i64(<4 x i64> undef)
15946829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V8 = call i64 @llvm.vector.reduce.umin.v8i64(<8 x i64> undef)
16046829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V16 = call i64 @llvm.vector.reduce.umin.v16i64(<16 x i64> undef)
16146829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %V32 = call i64 @llvm.vector.reduce.umin.v32i64(<32 x i64> undef)
16246829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %V64 = call i64 @llvm.vector.reduce.umin.v64i64(<64 x i64> undef)
16346829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %V128 = call i64 @llvm.vector.reduce.umin.v128i64(<128 x i64> undef)
164fb661e25SShihPo Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef
165fb661e25SShihPo Hung;
166ae7c6647SYeting Kuo  %V1   = call i64 @llvm.vector.reduce.umin.v1i64(<1 x i64> undef)
167ae7c6647SYeting Kuo  %V2   = call i64 @llvm.vector.reduce.umin.v2i64(<2 x i64> undef)
168ae7c6647SYeting Kuo  %V4   = call i64 @llvm.vector.reduce.umin.v4i64(<4 x i64> undef)
169ae7c6647SYeting Kuo  %V8   = call i64 @llvm.vector.reduce.umin.v8i64(<8 x i64> undef)
170ae7c6647SYeting Kuo  %V16  = call i64 @llvm.vector.reduce.umin.v16i64(<16 x i64> undef)
171ae7c6647SYeting Kuo  %V32  = call i64 @llvm.vector.reduce.umin.v32i64(<32 x i64> undef)
172ae7c6647SYeting Kuo  %V64  = call i64 @llvm.vector.reduce.umin.v64i64(<64 x i64> undef)
173ae7c6647SYeting Kuo  %V128 = call i64 @llvm.vector.reduce.umin.v128i64(<128 x i64> undef)
174ae7c6647SYeting Kuo  ret i32 undef
175ae7c6647SYeting Kuo}
176ae7c6647SYeting Kuo
1772b83467dSPhilip Reamesdefine i32 @reduce_smin_i1(i32 %arg) {
1782247e4deSPhilip Reames; CHECK-LABEL: 'reduce_smin_i1'
179bf716fb7SShih-Po Hung; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i1 @llvm.vector.reduce.smin.v1i1(<1 x i1> undef)
180bf716fb7SShih-Po Hung; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V2 = call i1 @llvm.vector.reduce.smin.v2i1(<2 x i1> undef)
181bf716fb7SShih-Po Hung; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V4 = call i1 @llvm.vector.reduce.smin.v4i1(<4 x i1> undef)
182bf716fb7SShih-Po Hung; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V8 = call i1 @llvm.vector.reduce.smin.v8i1(<8 x i1> undef)
183bf716fb7SShih-Po Hung; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V16 = call i1 @llvm.vector.reduce.smin.v16i1(<16 x i1> undef)
184bf716fb7SShih-Po Hung; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V32 = call i1 @llvm.vector.reduce.smin.v32i1(<32 x i1> undef)
185bf716fb7SShih-Po Hung; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V64 = call i1 @llvm.vector.reduce.smin.v64i1(<64 x i1> undef)
186bf716fb7SShih-Po Hung; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V128 = call i1 @llvm.vector.reduce.smin.v128i1(<128 x i1> undef)
1870a5d52a7SSergey Kachkov; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
188536095a2SPhilip Reames;
189fb661e25SShihPo Hung; SIZE-LABEL: 'reduce_smin_i1'
190bf716fb7SShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i1 @llvm.vector.reduce.smin.v1i1(<1 x i1> undef)
191bf716fb7SShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V2 = call i1 @llvm.vector.reduce.smin.v2i1(<2 x i1> undef)
192bf716fb7SShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V4 = call i1 @llvm.vector.reduce.smin.v4i1(<4 x i1> undef)
193bf716fb7SShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V8 = call i1 @llvm.vector.reduce.smin.v8i1(<8 x i1> undef)
194bf716fb7SShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V16 = call i1 @llvm.vector.reduce.smin.v16i1(<16 x i1> undef)
195bf716fb7SShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V32 = call i1 @llvm.vector.reduce.smin.v32i1(<32 x i1> undef)
196bf716fb7SShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V64 = call i1 @llvm.vector.reduce.smin.v64i1(<64 x i1> undef)
197bf716fb7SShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V128 = call i1 @llvm.vector.reduce.smin.v128i1(<128 x i1> undef)
198fb661e25SShihPo Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef
199fb661e25SShihPo Hung;
2002b83467dSPhilip Reames  %V1   = call i1 @llvm.vector.reduce.smin.v1i1(<1 x i1> undef)
2012b83467dSPhilip Reames  %V2   = call i1 @llvm.vector.reduce.smin.v2i1(<2 x i1> undef)
2022b83467dSPhilip Reames  %V4   = call i1 @llvm.vector.reduce.smin.v4i1(<4 x i1> undef)
2032b83467dSPhilip Reames  %V8   = call i1 @llvm.vector.reduce.smin.v8i1(<8 x i1> undef)
2042b83467dSPhilip Reames  %V16  = call i1 @llvm.vector.reduce.smin.v16i1(<16 x i1> undef)
2052b83467dSPhilip Reames  %V32  = call i1 @llvm.vector.reduce.smin.v32i1(<32 x i1> undef)
2062b83467dSPhilip Reames  %V64  = call i1 @llvm.vector.reduce.smin.v64i1(<64 x i1> undef)
2072b83467dSPhilip Reames  %V128 = call i1 @llvm.vector.reduce.smin.v128i1(<128 x i1> undef)
2082b83467dSPhilip Reames  ret i32 undef
2092b83467dSPhilip Reames}
2102b83467dSPhilip Reames
211ae7c6647SYeting Kuodefine i32 @reduce_smin_i8(i32 %arg) {
2122247e4deSPhilip Reames; CHECK-LABEL: 'reduce_smin_i8'
21346829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %V1 = call i8 @llvm.vector.reduce.smin.v1i8(<1 x i8> undef)
21446829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V2 = call i8 @llvm.vector.reduce.smin.v2i8(<2 x i8> undef)
21546829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %V4 = call i8 @llvm.vector.reduce.smin.v4i8(<4 x i8> undef)
21646829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %V8 = call i8 @llvm.vector.reduce.smin.v8i8(<8 x i8> undef)
21746829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %V16 = call i8 @llvm.vector.reduce.smin.v16i8(<16 x i8> undef)
21846829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %V32 = call i8 @llvm.vector.reduce.smin.v32i8(<32 x i8> undef)
21946829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %V64 = call i8 @llvm.vector.reduce.smin.v64i8(<64 x i8> undef)
22046829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %V128 = call i8 @llvm.vector.reduce.smin.v128i8(<128 x i8> undef)
2210a5d52a7SSergey Kachkov; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
222536095a2SPhilip Reames;
223fb661e25SShihPo Hung; SIZE-LABEL: 'reduce_smin_i8'
22446829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i8 @llvm.vector.reduce.smin.v1i8(<1 x i8> undef)
22546829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V2 = call i8 @llvm.vector.reduce.smin.v2i8(<2 x i8> undef)
22646829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V4 = call i8 @llvm.vector.reduce.smin.v4i8(<4 x i8> undef)
22746829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V8 = call i8 @llvm.vector.reduce.smin.v8i8(<8 x i8> undef)
22846829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V16 = call i8 @llvm.vector.reduce.smin.v16i8(<16 x i8> undef)
22946829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V32 = call i8 @llvm.vector.reduce.smin.v32i8(<32 x i8> undef)
23046829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V64 = call i8 @llvm.vector.reduce.smin.v64i8(<64 x i8> undef)
23146829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V128 = call i8 @llvm.vector.reduce.smin.v128i8(<128 x i8> undef)
232fb661e25SShihPo Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef
233fb661e25SShihPo Hung;
234ae7c6647SYeting Kuo  %V1   = call i8 @llvm.vector.reduce.smin.v1i8(<1 x i8> undef)
235ae7c6647SYeting Kuo  %V2   = call i8 @llvm.vector.reduce.smin.v2i8(<2 x i8> undef)
236ae7c6647SYeting Kuo  %V4   = call i8 @llvm.vector.reduce.smin.v4i8(<4 x i8> undef)
237ae7c6647SYeting Kuo  %V8   = call i8 @llvm.vector.reduce.smin.v8i8(<8 x i8> undef)
238ae7c6647SYeting Kuo  %V16  = call i8 @llvm.vector.reduce.smin.v16i8(<16 x i8> undef)
239ae7c6647SYeting Kuo  %V32  = call i8 @llvm.vector.reduce.smin.v32i8(<32 x i8> undef)
240ae7c6647SYeting Kuo  %V64  = call i8 @llvm.vector.reduce.smin.v64i8(<64 x i8> undef)
241ae7c6647SYeting Kuo  %V128 = call i8 @llvm.vector.reduce.smin.v128i8(<128 x i8> undef)
242ae7c6647SYeting Kuo  ret i32 undef
243ae7c6647SYeting Kuo}
244ae7c6647SYeting Kuo
245ae7c6647SYeting Kuodefine i32 @reduce_smin_i16(i32 %arg) {
2462247e4deSPhilip Reames; CHECK-LABEL: 'reduce_smin_i16'
24746829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %V1 = call i16 @llvm.vector.reduce.smin.v1i16(<1 x i16> undef)
24846829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V2 = call i16 @llvm.vector.reduce.smin.v2i16(<2 x i16> undef)
24946829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %V4 = call i16 @llvm.vector.reduce.smin.v4i16(<4 x i16> undef)
25046829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %V8 = call i16 @llvm.vector.reduce.smin.v8i16(<8 x i16> undef)
25146829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %V16 = call i16 @llvm.vector.reduce.smin.v16i16(<16 x i16> undef)
25246829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %V32 = call i16 @llvm.vector.reduce.smin.v32i16(<32 x i16> undef)
25346829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %V64 = call i16 @llvm.vector.reduce.smin.v64i16(<64 x i16> undef)
25446829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 15 for instruction: %V128 = call i16 @llvm.vector.reduce.smin.v128i16(<128 x i16> undef)
2550a5d52a7SSergey Kachkov; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
256536095a2SPhilip Reames;
257fb661e25SShihPo Hung; SIZE-LABEL: 'reduce_smin_i16'
25846829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i16 @llvm.vector.reduce.smin.v1i16(<1 x i16> undef)
25946829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V2 = call i16 @llvm.vector.reduce.smin.v2i16(<2 x i16> undef)
26046829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V4 = call i16 @llvm.vector.reduce.smin.v4i16(<4 x i16> undef)
26146829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V8 = call i16 @llvm.vector.reduce.smin.v8i16(<8 x i16> undef)
26246829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V16 = call i16 @llvm.vector.reduce.smin.v16i16(<16 x i16> undef)
26346829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V32 = call i16 @llvm.vector.reduce.smin.v32i16(<32 x i16> undef)
26446829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V64 = call i16 @llvm.vector.reduce.smin.v64i16(<64 x i16> undef)
26546829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %V128 = call i16 @llvm.vector.reduce.smin.v128i16(<128 x i16> undef)
266fb661e25SShihPo Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef
267fb661e25SShihPo Hung;
268ae7c6647SYeting Kuo  %V1   = call i16 @llvm.vector.reduce.smin.v1i16(<1 x i16> undef)
269ae7c6647SYeting Kuo  %V2   = call i16 @llvm.vector.reduce.smin.v2i16(<2 x i16> undef)
270ae7c6647SYeting Kuo  %V4   = call i16 @llvm.vector.reduce.smin.v4i16(<4 x i16> undef)
271ae7c6647SYeting Kuo  %V8   = call i16 @llvm.vector.reduce.smin.v8i16(<8 x i16> undef)
272ae7c6647SYeting Kuo  %V16  = call i16 @llvm.vector.reduce.smin.v16i16(<16 x i16> undef)
273ae7c6647SYeting Kuo  %V32  = call i16 @llvm.vector.reduce.smin.v32i16(<32 x i16> undef)
274ae7c6647SYeting Kuo  %V64  = call i16 @llvm.vector.reduce.smin.v64i16(<64 x i16> undef)
275ae7c6647SYeting Kuo  %V128 = call i16 @llvm.vector.reduce.smin.v128i16(<128 x i16> undef)
276ae7c6647SYeting Kuo  ret i32 undef
277ae7c6647SYeting Kuo}
278ae7c6647SYeting Kuo
279ae7c6647SYeting Kuodefine i32 @reduce_smin_i32(i32 %arg) {
2802247e4deSPhilip Reames; CHECK-LABEL: 'reduce_smin_i32'
28146829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %V1 = call i32 @llvm.vector.reduce.smin.v1i32(<1 x i32> undef)
28246829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V2 = call i32 @llvm.vector.reduce.smin.v2i32(<2 x i32> undef)
28346829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %V4 = call i32 @llvm.vector.reduce.smin.v4i32(<4 x i32> undef)
28446829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %V8 = call i32 @llvm.vector.reduce.smin.v8i32(<8 x i32> undef)
28546829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %V16 = call i32 @llvm.vector.reduce.smin.v16i32(<16 x i32> undef)
28646829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %V32 = call i32 @llvm.vector.reduce.smin.v32i32(<32 x i32> undef)
28746829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %V64 = call i32 @llvm.vector.reduce.smin.v64i32(<64 x i32> undef)
28846829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 30 for instruction: %V128 = call i32 @llvm.vector.reduce.smin.v128i32(<128 x i32> undef)
2890a5d52a7SSergey Kachkov; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
290536095a2SPhilip Reames;
291fb661e25SShihPo Hung; SIZE-LABEL: 'reduce_smin_i32'
29246829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i32 @llvm.vector.reduce.smin.v1i32(<1 x i32> undef)
29346829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V2 = call i32 @llvm.vector.reduce.smin.v2i32(<2 x i32> undef)
29446829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V4 = call i32 @llvm.vector.reduce.smin.v4i32(<4 x i32> undef)
29546829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V8 = call i32 @llvm.vector.reduce.smin.v8i32(<8 x i32> undef)
29646829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V16 = call i32 @llvm.vector.reduce.smin.v16i32(<16 x i32> undef)
29746829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V32 = call i32 @llvm.vector.reduce.smin.v32i32(<32 x i32> undef)
29846829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %V64 = call i32 @llvm.vector.reduce.smin.v64i32(<64 x i32> undef)
29946829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %V128 = call i32 @llvm.vector.reduce.smin.v128i32(<128 x i32> undef)
300fb661e25SShihPo Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef
301fb661e25SShihPo Hung;
302ae7c6647SYeting Kuo  %V1   = call i32 @llvm.vector.reduce.smin.v1i32(<1 x i32> undef)
303ae7c6647SYeting Kuo  %V2   = call i32 @llvm.vector.reduce.smin.v2i32(<2 x i32> undef)
304ae7c6647SYeting Kuo  %V4   = call i32 @llvm.vector.reduce.smin.v4i32(<4 x i32> undef)
305ae7c6647SYeting Kuo  %V8   = call i32 @llvm.vector.reduce.smin.v8i32(<8 x i32> undef)
306ae7c6647SYeting Kuo  %V16  = call i32 @llvm.vector.reduce.smin.v16i32(<16 x i32> undef)
307ae7c6647SYeting Kuo  %V32  = call i32 @llvm.vector.reduce.smin.v32i32(<32 x i32> undef)
308ae7c6647SYeting Kuo  %V64  = call i32 @llvm.vector.reduce.smin.v64i32(<64 x i32> undef)
309ae7c6647SYeting Kuo  %V128 = call i32 @llvm.vector.reduce.smin.v128i32(<128 x i32> undef)
310ae7c6647SYeting Kuo  ret i32 undef
311ae7c6647SYeting Kuo}
312ae7c6647SYeting Kuo
313ae7c6647SYeting Kuodefine i32 @reduce_smin_i64(i32 %arg) {
3142247e4deSPhilip Reames; CHECK-LABEL: 'reduce_smin_i64'
31546829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %V1 = call i64 @llvm.vector.reduce.smin.v1i64(<1 x i64> undef)
31646829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V2 = call i64 @llvm.vector.reduce.smin.v2i64(<2 x i64> undef)
31746829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %V4 = call i64 @llvm.vector.reduce.smin.v4i64(<4 x i64> undef)
31846829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %V8 = call i64 @llvm.vector.reduce.smin.v8i64(<8 x i64> undef)
31946829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %V16 = call i64 @llvm.vector.reduce.smin.v16i64(<16 x i64> undef)
32046829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 13 for instruction: %V32 = call i64 @llvm.vector.reduce.smin.v32i64(<32 x i64> undef)
32146829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 29 for instruction: %V64 = call i64 @llvm.vector.reduce.smin.v64i64(<64 x i64> undef)
32246829e54SLiqinWeng; CHECK-NEXT:  Cost Model: Found an estimated cost of 61 for instruction: %V128 = call i64 @llvm.vector.reduce.smin.v128i64(<128 x i64> undef)
3230a5d52a7SSergey Kachkov; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
324536095a2SPhilip Reames;
325fb661e25SShihPo Hung; SIZE-LABEL: 'reduce_smin_i64'
32646829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V1 = call i64 @llvm.vector.reduce.smin.v1i64(<1 x i64> undef)
32746829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V2 = call i64 @llvm.vector.reduce.smin.v2i64(<2 x i64> undef)
32846829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V4 = call i64 @llvm.vector.reduce.smin.v4i64(<4 x i64> undef)
32946829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V8 = call i64 @llvm.vector.reduce.smin.v8i64(<8 x i64> undef)
33046829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V16 = call i64 @llvm.vector.reduce.smin.v16i64(<16 x i64> undef)
33146829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %V32 = call i64 @llvm.vector.reduce.smin.v32i64(<32 x i64> undef)
33246829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %V64 = call i64 @llvm.vector.reduce.smin.v64i64(<64 x i64> undef)
33346829e54SLiqinWeng; SIZE-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %V128 = call i64 @llvm.vector.reduce.smin.v128i64(<128 x i64> undef)
334fb661e25SShihPo Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef
335fb661e25SShihPo Hung;
336ae7c6647SYeting Kuo  %V1   = call i64 @llvm.vector.reduce.smin.v1i64(<1 x i64> undef)
337ae7c6647SYeting Kuo  %V2   = call i64 @llvm.vector.reduce.smin.v2i64(<2 x i64> undef)
338ae7c6647SYeting Kuo  %V4   = call i64 @llvm.vector.reduce.smin.v4i64(<4 x i64> undef)
339ae7c6647SYeting Kuo  %V8   = call i64 @llvm.vector.reduce.smin.v8i64(<8 x i64> undef)
340ae7c6647SYeting Kuo  %V16  = call i64 @llvm.vector.reduce.smin.v16i64(<16 x i64> undef)
341ae7c6647SYeting Kuo  %V32  = call i64 @llvm.vector.reduce.smin.v32i64(<32 x i64> undef)
342ae7c6647SYeting Kuo  %V64  = call i64 @llvm.vector.reduce.smin.v64i64(<64 x i64> undef)
343ae7c6647SYeting Kuo  %V128 = call i64 @llvm.vector.reduce.smin.v128i64(<128 x i64> undef)
344ae7c6647SYeting Kuo  ret i32 undef
345ae7c6647SYeting Kuo}
346ae7c6647SYeting Kuo
3472b83467dSPhilip Reamesdeclare i1 @llvm.vector.reduce.umin.v1i1(<1 x i1>)
3482b83467dSPhilip Reamesdeclare i1 @llvm.vector.reduce.umin.v2i1(<2 x i1>)
3492b83467dSPhilip Reamesdeclare i1 @llvm.vector.reduce.umin.v4i1(<4 x i1>)
3502b83467dSPhilip Reamesdeclare i1 @llvm.vector.reduce.umin.v8i1(<8 x i1>)
3512b83467dSPhilip Reamesdeclare i1 @llvm.vector.reduce.umin.v16i1(<16 x i1>)
3522b83467dSPhilip Reamesdeclare i1 @llvm.vector.reduce.umin.v32i1(<32 x i1>)
3532b83467dSPhilip Reamesdeclare i1 @llvm.vector.reduce.umin.v64i1(<64 x i1>)
3542b83467dSPhilip Reamesdeclare i1 @llvm.vector.reduce.umin.v128i1(<128 x i1>)
355ae7c6647SYeting Kuodeclare i8 @llvm.vector.reduce.umin.v1i8(<1 x i8>)
356ae7c6647SYeting Kuodeclare i8 @llvm.vector.reduce.umin.v2i8(<2 x i8>)
357ae7c6647SYeting Kuodeclare i8 @llvm.vector.reduce.umin.v4i8(<4 x i8>)
358ae7c6647SYeting Kuodeclare i8 @llvm.vector.reduce.umin.v8i8(<8 x i8>)
359ae7c6647SYeting Kuodeclare i8 @llvm.vector.reduce.umin.v16i8(<16 x i8>)
360ae7c6647SYeting Kuodeclare i8 @llvm.vector.reduce.umin.v32i8(<32 x i8>)
361ae7c6647SYeting Kuodeclare i8 @llvm.vector.reduce.umin.v64i8(<64 x i8>)
362ae7c6647SYeting Kuodeclare i8 @llvm.vector.reduce.umin.v128i8(<128 x i8>)
363ae7c6647SYeting Kuodeclare i16 @llvm.vector.reduce.umin.v1i16(<1 x i16>)
364ae7c6647SYeting Kuodeclare i16 @llvm.vector.reduce.umin.v2i16(<2 x i16>)
365ae7c6647SYeting Kuodeclare i16 @llvm.vector.reduce.umin.v4i16(<4 x i16>)
366ae7c6647SYeting Kuodeclare i16 @llvm.vector.reduce.umin.v8i16(<8 x i16>)
367ae7c6647SYeting Kuodeclare i16 @llvm.vector.reduce.umin.v16i16(<16 x i16>)
368ae7c6647SYeting Kuodeclare i16 @llvm.vector.reduce.umin.v32i16(<32 x i16>)
369ae7c6647SYeting Kuodeclare i16 @llvm.vector.reduce.umin.v64i16(<64 x i16>)
370ae7c6647SYeting Kuodeclare i16 @llvm.vector.reduce.umin.v128i16(<128 x i16>)
371ae7c6647SYeting Kuodeclare i32 @llvm.vector.reduce.umin.v1i32(<1 x i32>)
372ae7c6647SYeting Kuodeclare i32 @llvm.vector.reduce.umin.v2i32(<2 x i32>)
373ae7c6647SYeting Kuodeclare i32 @llvm.vector.reduce.umin.v4i32(<4 x i32>)
374ae7c6647SYeting Kuodeclare i32 @llvm.vector.reduce.umin.v8i32(<8 x i32>)
375ae7c6647SYeting Kuodeclare i32 @llvm.vector.reduce.umin.v16i32(<16 x i32>)
376ae7c6647SYeting Kuodeclare i32 @llvm.vector.reduce.umin.v32i32(<32 x i32>)
377ae7c6647SYeting Kuodeclare i32 @llvm.vector.reduce.umin.v64i32(<64 x i32>)
378ae7c6647SYeting Kuodeclare i32 @llvm.vector.reduce.umin.v128i32(<128 x i32>)
379ae7c6647SYeting Kuodeclare i64 @llvm.vector.reduce.umin.v1i64(<1 x i64>)
380ae7c6647SYeting Kuodeclare i64 @llvm.vector.reduce.umin.v2i64(<2 x i64>)
381ae7c6647SYeting Kuodeclare i64 @llvm.vector.reduce.umin.v4i64(<4 x i64>)
382ae7c6647SYeting Kuodeclare i64 @llvm.vector.reduce.umin.v8i64(<8 x i64>)
383ae7c6647SYeting Kuodeclare i64 @llvm.vector.reduce.umin.v16i64(<16 x i64>)
384ae7c6647SYeting Kuodeclare i64 @llvm.vector.reduce.umin.v32i64(<32 x i64>)
385ae7c6647SYeting Kuodeclare i64 @llvm.vector.reduce.umin.v64i64(<64 x i64>)
386ae7c6647SYeting Kuodeclare i64 @llvm.vector.reduce.umin.v128i64(<128 x i64>)
3872b83467dSPhilip Reamesdeclare i1 @llvm.vector.reduce.smin.v1i1(<1 x i1>)
3882b83467dSPhilip Reamesdeclare i1 @llvm.vector.reduce.smin.v2i1(<2 x i1>)
3892b83467dSPhilip Reamesdeclare i1 @llvm.vector.reduce.smin.v4i1(<4 x i1>)
3902b83467dSPhilip Reamesdeclare i1 @llvm.vector.reduce.smin.v8i1(<8 x i1>)
3912b83467dSPhilip Reamesdeclare i1 @llvm.vector.reduce.smin.v16i1(<16 x i1>)
3922b83467dSPhilip Reamesdeclare i1 @llvm.vector.reduce.smin.v32i1(<32 x i1>)
3932b83467dSPhilip Reamesdeclare i1 @llvm.vector.reduce.smin.v64i1(<64 x i1>)
3942b83467dSPhilip Reamesdeclare i1 @llvm.vector.reduce.smin.v128i1(<128 x i1>)
395ae7c6647SYeting Kuodeclare i8 @llvm.vector.reduce.smin.v1i8(<1 x i8>)
396ae7c6647SYeting Kuodeclare i8 @llvm.vector.reduce.smin.v2i8(<2 x i8>)
397ae7c6647SYeting Kuodeclare i8 @llvm.vector.reduce.smin.v4i8(<4 x i8>)
398ae7c6647SYeting Kuodeclare i8 @llvm.vector.reduce.smin.v8i8(<8 x i8>)
399ae7c6647SYeting Kuodeclare i8 @llvm.vector.reduce.smin.v16i8(<16 x i8>)
400ae7c6647SYeting Kuodeclare i8 @llvm.vector.reduce.smin.v32i8(<32 x i8>)
401ae7c6647SYeting Kuodeclare i8 @llvm.vector.reduce.smin.v64i8(<64 x i8>)
402ae7c6647SYeting Kuodeclare i8 @llvm.vector.reduce.smin.v128i8(<128 x i8>)
403ae7c6647SYeting Kuodeclare i16 @llvm.vector.reduce.smin.v1i16(<1 x i16>)
404ae7c6647SYeting Kuodeclare i16 @llvm.vector.reduce.smin.v2i16(<2 x i16>)
405ae7c6647SYeting Kuodeclare i16 @llvm.vector.reduce.smin.v4i16(<4 x i16>)
406ae7c6647SYeting Kuodeclare i16 @llvm.vector.reduce.smin.v8i16(<8 x i16>)
407ae7c6647SYeting Kuodeclare i16 @llvm.vector.reduce.smin.v16i16(<16 x i16>)
408ae7c6647SYeting Kuodeclare i16 @llvm.vector.reduce.smin.v32i16(<32 x i16>)
409ae7c6647SYeting Kuodeclare i16 @llvm.vector.reduce.smin.v64i16(<64 x i16>)
410ae7c6647SYeting Kuodeclare i16 @llvm.vector.reduce.smin.v128i16(<128 x i16>)
411ae7c6647SYeting Kuodeclare i32 @llvm.vector.reduce.smin.v1i32(<1 x i32>)
412ae7c6647SYeting Kuodeclare i32 @llvm.vector.reduce.smin.v2i32(<2 x i32>)
413ae7c6647SYeting Kuodeclare i32 @llvm.vector.reduce.smin.v4i32(<4 x i32>)
414ae7c6647SYeting Kuodeclare i32 @llvm.vector.reduce.smin.v8i32(<8 x i32>)
415ae7c6647SYeting Kuodeclare i32 @llvm.vector.reduce.smin.v16i32(<16 x i32>)
416ae7c6647SYeting Kuodeclare i32 @llvm.vector.reduce.smin.v32i32(<32 x i32>)
417ae7c6647SYeting Kuodeclare i32 @llvm.vector.reduce.smin.v64i32(<64 x i32>)
418ae7c6647SYeting Kuodeclare i32 @llvm.vector.reduce.smin.v128i32(<128 x i32>)
419ae7c6647SYeting Kuodeclare i64 @llvm.vector.reduce.smin.v1i64(<1 x i64>)
420ae7c6647SYeting Kuodeclare i64 @llvm.vector.reduce.smin.v2i64(<2 x i64>)
421ae7c6647SYeting Kuodeclare i64 @llvm.vector.reduce.smin.v4i64(<4 x i64>)
422ae7c6647SYeting Kuodeclare i64 @llvm.vector.reduce.smin.v8i64(<8 x i64>)
423ae7c6647SYeting Kuodeclare i64 @llvm.vector.reduce.smin.v16i64(<16 x i64>)
424ae7c6647SYeting Kuodeclare i64 @llvm.vector.reduce.smin.v32i64(<32 x i64>)
425ae7c6647SYeting Kuodeclare i64 @llvm.vector.reduce.smin.v64i64(<64 x i64>)
426ae7c6647SYeting Kuodeclare i64 @llvm.vector.reduce.smin.v128i64(<128 x i64>)
427