xref: /llvm-project/llvm/test/Analysis/CostModel/SystemZ/reduce-or.ll (revision 4178e33470763b406f614b646c8b01d24309e20b)
160470ac7SAlexey Bataev; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
2*4178e334SSimon Pilgrim; RUN: opt < %s -mtriple=systemz-unknown -mcpu=z13 -passes="print<cost-model>" -cost-kind=throughput 2>&1 -disable-output | FileCheck %s
360470ac7SAlexey Bataev
460470ac7SAlexey Bataevdefine i32 @reduce_i1(i32 %arg) {
560470ac7SAlexey Bataev; CHECK-LABEL: 'reduce_i1'
660470ac7SAlexey Bataev; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %V1 = call i1 @llvm.vector.reduce.or.v1i1(<1 x i1> undef)
714ae0cf0SAlexey Bataev; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %V2 = call i1 @llvm.vector.reduce.or.v2i1(<2 x i1> undef)
814ae0cf0SAlexey Bataev; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %V4 = call i1 @llvm.vector.reduce.or.v4i1(<4 x i1> undef)
914ae0cf0SAlexey Bataev; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %V8 = call i1 @llvm.vector.reduce.or.v8i1(<8 x i1> undef)
1014ae0cf0SAlexey Bataev; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %V16 = call i1 @llvm.vector.reduce.or.v16i1(<16 x i1> undef)
1114ae0cf0SAlexey Bataev; CHECK-NEXT:  Cost Model: Found an estimated cost of 66 for instruction: %V32 = call i1 @llvm.vector.reduce.or.v32i1(<32 x i1> undef)
1214ae0cf0SAlexey Bataev; CHECK-NEXT:  Cost Model: Found an estimated cost of 130 for instruction: %V64 = call i1 @llvm.vector.reduce.or.v64i1(<64 x i1> undef)
1314ae0cf0SAlexey Bataev; CHECK-NEXT:  Cost Model: Found an estimated cost of 258 for instruction: %V128 = call i1 @llvm.vector.reduce.or.v128i1(<128 x i1> undef)
1460470ac7SAlexey Bataev; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef
1560470ac7SAlexey Bataev;
1660470ac7SAlexey Bataev  %V1   = call i1 @llvm.vector.reduce.or.v1i1(<1 x i1> undef)
1760470ac7SAlexey Bataev  %V2   = call i1 @llvm.vector.reduce.or.v2i1(<2 x i1> undef)
1860470ac7SAlexey Bataev  %V4   = call i1 @llvm.vector.reduce.or.v4i1(<4 x i1> undef)
1960470ac7SAlexey Bataev  %V8   = call i1 @llvm.vector.reduce.or.v8i1(<8 x i1> undef)
2060470ac7SAlexey Bataev  %V16  = call i1 @llvm.vector.reduce.or.v16i1(<16 x i1> undef)
2160470ac7SAlexey Bataev  %V32  = call i1 @llvm.vector.reduce.or.v32i1(<32 x i1> undef)
2260470ac7SAlexey Bataev  %V64  = call i1 @llvm.vector.reduce.or.v64i1(<64 x i1> undef)
2360470ac7SAlexey Bataev  %V128 = call i1 @llvm.vector.reduce.or.v128i1(<128 x i1> undef)
2460470ac7SAlexey Bataev  ret i32 undef
2560470ac7SAlexey Bataev}
2660470ac7SAlexey Bataev
2760470ac7SAlexey Bataevdeclare i1 @llvm.vector.reduce.or.v1i1(<1 x i1>)
2860470ac7SAlexey Bataevdeclare i1 @llvm.vector.reduce.or.v2i1(<2 x i1>)
2960470ac7SAlexey Bataevdeclare i1 @llvm.vector.reduce.or.v4i1(<4 x i1>)
3060470ac7SAlexey Bataevdeclare i1 @llvm.vector.reduce.or.v8i1(<8 x i1>)
3160470ac7SAlexey Bataevdeclare i1 @llvm.vector.reduce.or.v16i1(<16 x i1>)
3260470ac7SAlexey Bataevdeclare i1 @llvm.vector.reduce.or.v32i1(<32 x i1>)
3360470ac7SAlexey Bataevdeclare i1 @llvm.vector.reduce.or.v64i1(<64 x i1>)
3460470ac7SAlexey Bataevdeclare i1 @llvm.vector.reduce.or.v128i1(<128 x i1>)
35