@@ -1016,6 +1016,11 @@ define void @zext() {
1016
1016
1017
1017
define void @trunc () {
1018
1018
; RV32-LABEL: 'trunc'
1019
+ ; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_v2i2 = trunc <2 x i16> undef to <2 x i2>
1020
+ ; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_v2i4 = trunc <2 x i16> undef to <2 x i4>
1021
+ ; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_v2i6 = trunc <2 x i16> undef to <2 x i6>
1022
+ ; RV32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i4_v2i2 = trunc <2 x i4> undef to <2 x i2>
1023
+ ; RV32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i6_v2i4 = trunc <2 x i6> undef to <2 x i4>
1019
1024
; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_v2i8 = trunc <2 x i16> undef to <2 x i8>
1020
1025
; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i32_v2i8 = trunc <2 x i32> undef to <2 x i8>
1021
1026
; RV32-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i64_v2i8 = trunc <2 x i64> undef to <2 x i8>
@@ -1169,6 +1174,11 @@ define void @trunc() {
1169
1174
; RV32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
1170
1175
;
1171
1176
; RV64-LABEL: 'trunc'
1177
+ ; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_v2i2 = trunc <2 x i16> undef to <2 x i2>
1178
+ ; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_v2i4 = trunc <2 x i16> undef to <2 x i4>
1179
+ ; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_v2i6 = trunc <2 x i16> undef to <2 x i6>
1180
+ ; RV64-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i4_v2i2 = trunc <2 x i4> undef to <2 x i2>
1181
+ ; RV64-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i6_v2i4 = trunc <2 x i6> undef to <2 x i4>
1172
1182
; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_v2i8 = trunc <2 x i16> undef to <2 x i8>
1173
1183
; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i32_v2i8 = trunc <2 x i32> undef to <2 x i8>
1174
1184
; RV64-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i64_v2i8 = trunc <2 x i64> undef to <2 x i8>
@@ -1321,6 +1331,13 @@ define void @trunc() {
1321
1331
; RV64-NEXT: Cost Model: Found an estimated cost of 135 for instruction: %nxv64i64_nxv64i1 = trunc <vscale x 64 x i64> undef to <vscale x 64 x i1>
1322
1332
; RV64-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
1323
1333
;
1334
+
1335
+ %v2i16_v2i2 = trunc <2 x i16 > undef to <2 x i2 >
1336
+ %v2i16_v2i4 = trunc <2 x i16 > undef to <2 x i4 >
1337
+ %v2i16_v2i6 = trunc <2 x i16 > undef to <2 x i6 >
1338
+ %v2i4_v2i2 = trunc <2 x i4 > undef to <2 x i2 >
1339
+ %v2i6_v2i4 = trunc <2 x i6 > undef to <2 x i4 >
1340
+
1324
1341
%v2i16_v2i8 = trunc <2 x i16 > undef to <2 x i8 >
1325
1342
%v2i32_v2i8 = trunc <2 x i32 > undef to <2 x i8 >
1326
1343
%v2i64_v2i8 = trunc <2 x i64 > undef to <2 x i8 >
0 commit comments