@@ -11,9 +11,11 @@ body: |
11
11
%1:_(<vscale x 2 x s32>) = G_IMPLICIT_DEF
12
12
%2:_(<vscale x 1 x s32>) = G_IMPLICIT_DEF
13
13
14
+ ; CHECK: generic instruction must use register operands
14
15
; CHECK: G_INSERT_SUBVECTOR first source must be a register
15
16
%3:_(<vscale x 2 x s32>) = G_INSERT_SUBVECTOR 1, %2, 0
16
17
18
+ ; CHECK: generic instruction must use register operands
17
19
; CHECK: G_INSERT_SUBVECTOR second source must be a register
18
20
%4:_(<vscale x 2 x s32>) = G_INSERT_SUBVECTOR %1, 1, 0
19
21
@@ -23,18 +25,18 @@ body: |
23
25
; CHECK: Destination type must be a vector
24
26
%6:_(s32) = G_INSERT_SUBVECTOR %1, %2, 0
25
27
26
- ; CHECK: First source must be a vector
28
+ ; CHECK: Type mismatch in generic instruction
27
29
%7:_(<vscale x 2 x s32>) = G_INSERT_SUBVECTOR %0, %2, 0
28
30
29
31
; CHECK: Second source must be a vector
30
32
%8:_(<vscale x 2 x s32>) = G_INSERT_SUBVECTOR %1, %0, 0
31
33
32
- ; CHECK: Destination type must match the first source vector type
34
+ ; CHECK: Type mismatch in generic instruction
33
35
%9:_(<vscale x 2 x s32>) = G_INSERT_SUBVECTOR %2, %1, 0
34
36
35
37
%10:_(<vscale x 1 x s16>) = G_IMPLICIT_DEF
36
38
37
- ; CHECK: Element type of source vectors must be the same
39
+ ; CHECK: Element type of vectors must be the same
38
40
%11:_(<vscale x 2 x s32>) = G_INSERT_SUBVECTOR %1, %10, 0
39
41
40
42
%12:_(<vscale x 4 x s32>) = G_IMPLICIT_DEF
@@ -43,5 +45,23 @@ body: |
43
45
%13:_(<vscale x 4 x s32>) = G_INSERT_SUBVECTOR %12, %1, 3
44
46
45
47
; 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
47
67
...
0 commit comments