@@ -11,9 +11,11 @@ body: |
1111 %1:_(<vscale x 2 x s32>) = G_IMPLICIT_DEF
1212 %2:_(<vscale x 1 x s32>) = G_IMPLICIT_DEF
1313
14+ ; CHECK: generic instruction must use register operands
1415 ; CHECK: G_INSERT_SUBVECTOR first source must be a register
1516 %3:_(<vscale x 2 x s32>) = G_INSERT_SUBVECTOR 1, %2, 0
1617
18+ ; CHECK: generic instruction must use register operands
1719 ; CHECK: G_INSERT_SUBVECTOR second source must be a register
1820 %4:_(<vscale x 2 x s32>) = G_INSERT_SUBVECTOR %1, 1, 0
1921
@@ -23,18 +25,18 @@ body: |
2325 ; CHECK: Destination type must be a vector
2426 %6:_(s32) = G_INSERT_SUBVECTOR %1, %2, 0
2527
26- ; CHECK: First source must be a vector
28+ ; CHECK: Type mismatch in generic instruction
2729 %7:_(<vscale x 2 x s32>) = G_INSERT_SUBVECTOR %0, %2, 0
2830
2931 ; CHECK: Second source must be a vector
3032 %8:_(<vscale x 2 x s32>) = G_INSERT_SUBVECTOR %1, %0, 0
3133
32- ; CHECK: Destination type must match the first source vector type
34+ ; CHECK: Type mismatch in generic instruction
3335 %9:_(<vscale x 2 x s32>) = G_INSERT_SUBVECTOR %2, %1, 0
3436
3537 %10:_(<vscale x 1 x s16>) = G_IMPLICIT_DEF
3638
37- ; CHECK: Element type of source vectors must be the same
39+ ; CHECK: Element type of vectors must be the same
3840 %11:_(<vscale x 2 x s32>) = G_INSERT_SUBVECTOR %1, %10, 0
3941
4042 %12:_(<vscale x 4 x s32>) = G_IMPLICIT_DEF
@@ -43,5 +45,23 @@ body: |
4345 %13:_(<vscale x 4 x s32>) = G_INSERT_SUBVECTOR %12, %1, 3
4446
4547 ; CHECK: Index must be a multiple of the second source vector's minimum vector length
46- %13:_(<vscale x 4 x s32>) = G_INSERT_SUBVECTOR %12, %1, 1
48+ %14:_(<vscale x 4 x s32>) = G_INSERT_SUBVECTOR %12, %1, 1
49+
50+ %15:_(<vscale x 4 x s32>) = G_IMPLICIT_DEF
51+
52+ ; CHECK: Second source must be smaller than destination vector
53+ %16:_(<vscale x 2 x s32>) = G_INSERT_SUBVECTOR %1, %15, 0
54+
55+ ; CHECK: Subvector type and index must not cause insert to overrun the vector being inserted into
56+ %17:_(<vscale x 4 x s32>) = G_INSERT_SUBVECTOR %12, %1, 4
57+
58+ %18:_(<vscale x 3 x s32>) = G_IMPLICIT_DEF
59+
60+ ; CHECK: Subvector type and index must not cause insert to overrun the vector being inserted into
61+ %19:_(<vscale x 3 x s32>) = G_INSERT_SUBVECTOR %18, %1, 2
62+
63+ %20:_(<2 x s32>) = G_IMPLICIT_DEF
64+
65+ ; CHECK: Vector types must both be fixed or both be scalable
66+ %21:_(<vscale x 1 x s32>) = G_INSERT_SUBVECTOR %12, %20, 2
4767 ...
0 commit comments