Skip to content

Commit ab33c3d

Browse files
committed
[GlobalISel][TableGen] Make variadic-errors.td test more robust
Use a regex instead of hardcoded numbers for anonymous pattern suffixes.
1 parent 84a3739 commit ab33c3d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/test/TableGen/GlobalISelCombinerEmitter/variadic-errors.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ def ConflictingInference : GICombineRule<
2727
(apply (G_MERGE_VALUES $dst, GIVariadic<3, 6>:$args))>;
2828

2929
// CHECK: :[[@LINE+2]]:{{[0-9]+}}: error: cannot parse operand type: minimum number of arguments must be greater than zero in GIVariadic
30-
// CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: Failed to parse pattern: '(G_BUILD_VECTOR ?:$dst, anonymous_8021:$a)'
30+
// CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: Failed to parse pattern: '(G_BUILD_VECTOR ?:$dst, anonymous_{{[0-9]+}}:$a)'
3131
def InvalidBounds0 : GICombineRule<
3232
(defs root:$dst),
3333
(match (G_BUILD_VECTOR $dst, GIVariadic<0>:$a)),
3434
(apply [{ APPLY }])>;
3535

3636
// CHECK: :[[@LINE+2]]:{{[0-9]+}}: error: cannot parse operand type: maximum number of arguments (1) must be zero, or greater than the minimum number of arguments (1) in GIVariadic
37-
// CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: Failed to parse pattern: '(G_BUILD_VECTOR ?:$dst, anonymous_8022:$a)'
37+
// CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: Failed to parse pattern: '(G_BUILD_VECTOR ?:$dst, anonymous_{{[0-9]+}}:$a)'
3838
def InvalidBounds1 : GICombineRule<
3939
(defs root:$dst),
4040
(match (G_BUILD_VECTOR $dst, GIVariadic<1,1>:$a)),

0 commit comments

Comments
 (0)