Skip to content

Commit 12c2a20

Browse files
committed
Fix missing tests
1 parent 2020283 commit 12c2a20

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
@@ -1249,10 +1249,14 @@ RISCVTTIImpl::getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA,
12491249
IID = Intrinsic::umin;
12501250
break;
12511251
case Intrinsic::vp_reduce_fmax:
1252+
IID = Intrinsic::maxnum;
1253+
break;
12521254
case Intrinsic::vp_reduce_fmaximum:
12531255
IID = Intrinsic::maximum;
12541256
break;
12551257
case Intrinsic::vp_reduce_fmin:
1258+
IID = Intrinsic::minnum;
1259+
break;
12561260
case Intrinsic::vp_reduce_fminimum:
12571261
IID = Intrinsic::minimum;
12581262
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)