Skip to content

Commit 0430505

Browse files
committed
Fix missing tests
1 parent 479f8d1 commit 0430505

File tree

6 files changed

+166
-156
lines changed

6 files changed

+166
-156
lines changed

llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1237,10 +1237,14 @@ RISCVTTIImpl::getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA,
12371237
IID = Intrinsic::umin;
12381238
break;
12391239
case Intrinsic::vp_reduce_fmax:
1240+
IID = Intrinsic::maxnum;
1241+
break;
12401242
case Intrinsic::vp_reduce_fmaximum:
12411243
IID = Intrinsic::maximum;
12421244
break;
12431245
case Intrinsic::vp_reduce_fmin:
1246+
IID = Intrinsic::minnum;
1247+
break;
12441248
case Intrinsic::vp_reduce_fminimum:
12451249
IID = Intrinsic::minimum;
12461250
break;

llvm/test/Analysis/CostModel/RISCV/reduce-and.ll

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ define i32 @reduce_i8(i32 %arg) {
100100
; CHECK-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V16_vp = call i8 @llvm.vp.reduce.and.v16i8(i8 undef, <16 x i8> undef, <16 x i1> undef, i32 undef)
101101
; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V32_vp = call i8 @llvm.vp.reduce.and.v32i8(i8 undef, <32 x i8> undef, <32 x i1> undef, i32 undef)
102102
; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V64_vp = call i8 @llvm.vp.reduce.and.v64i8(i8 undef, <64 x i8> undef, <64 x i1> undef, i32 undef)
103+
; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V128_vp = call i8 @llvm.vp.reduce.and.v128i8(i8 undef, <128 x i8> undef, <128 x i1> undef, i32 undef)
103104
; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
104105
;
105106
; SIZE-LABEL: 'reduce_i8'
@@ -118,6 +119,7 @@ define i32 @reduce_i8(i32 %arg) {
118119
; SIZE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V16_vp = call i8 @llvm.vp.reduce.and.v16i8(i8 undef, <16 x i8> undef, <16 x i1> undef, i32 undef)
119120
; SIZE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V32_vp = call i8 @llvm.vp.reduce.and.v32i8(i8 undef, <32 x i8> undef, <32 x i1> undef, i32 undef)
120121
; SIZE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V64_vp = call i8 @llvm.vp.reduce.and.v64i8(i8 undef, <64 x i8> undef, <64 x i1> undef, i32 undef)
122+
; SIZE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V128_vp = call i8 @llvm.vp.reduce.and.v128i8(i8 undef, <128 x i8> undef, <128 x i1> undef, i32 undef)
121123
; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef
122124
;
123125
%V1 = call i8 @llvm.vector.reduce.and.v1i8(<1 x i8> undef)
@@ -136,6 +138,7 @@ define i32 @reduce_i8(i32 %arg) {
136138
%V16_vp = call i8 @llvm.vp.reduce.and.v16i8(i8 undef, <16 x i8> undef, <16 x i1> undef, i32 undef)
137139
%V32_vp = call i8 @llvm.vp.reduce.and.v32i8(i8 undef, <32 x i8> undef, <32 x i1> undef, i32 undef)
138140
%V64_vp = call i8 @llvm.vp.reduce.and.v64i8(i8 undef, <64 x i8> undef, <64 x i1> undef, i32 undef)
141+
%V128_vp = call i8 @llvm.vp.reduce.and.v128i8(i8 undef, <128 x i8> undef, <128 x i1> undef, i32 undef)
139142
ret i32 undef
140143
}
141144

0 commit comments

Comments
 (0)