@@ -1016,6 +1016,11 @@ define void @zext() {
10161016
10171017define void @trunc () {
10181018; 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>
10191024; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_v2i8 = trunc <2 x i16> undef to <2 x i8>
10201025; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i32_v2i8 = trunc <2 x i32> undef to <2 x i8>
10211026; 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() {
11691174; RV32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
11701175;
11711176; 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>
11721182; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_v2i8 = trunc <2 x i16> undef to <2 x i8>
11731183; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i32_v2i8 = trunc <2 x i32> undef to <2 x i8>
11741184; 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() {
13211331; 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>
13221332; RV64-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
13231333;
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+
13241341 %v2i16_v2i8 = trunc <2 x i16 > undef to <2 x i8 >
13251342 %v2i32_v2i8 = trunc <2 x i32 > undef to <2 x i8 >
13261343 %v2i64_v2i8 = trunc <2 x i64 > undef to <2 x i8 >
0 commit comments