invalid-locations.mlir
2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
// RUN: mlir-opt %s -split-input-file -verify-diagnostics
// -----
func @location_missing_l_paren() {
^bb:
return loc) // expected-error {{expected '(' in inline location}}
}
// -----
func @location_missing_r_paren() {
^bb:
return loc(unknown // expected-error@+1 {{expected ')' in inline location}}
}
// -----
func @location_invalid_instance() {
^bb:
return loc() // expected-error {{expected location instance}}
}
// -----
func @location_name_missing_r_paren() {
^bb:
return loc("foo"(unknown]) // expected-error {{expected ')' after child location of NameLoc}}
}
// -----
func @location_name_child_is_name() {
^bb:
return loc("foo"("foo")) // expected-error {{child of NameLoc cannot be another NameLoc}}
}
// -----
func @location_callsite_missing_l_paren() {
^bb:
return loc(callsite unknown // expected-error {{expected '(' in callsite location}}
}
// -----
func @location_callsite_missing_callee() {
^bb:
return loc(callsite( at ) // expected-error {{expected location instance}}
}
// -----
func @location_callsite_missing_at() {
^bb:
return loc(callsite(unknown unknown) // expected-error {{expected 'at' in callsite location}}
}
// -----
func @location_callsite_missing_caller() {
^bb:
return loc(callsite(unknown at ) // expected-error {{expected location instance}}
}
// -----
func @location_callsite_missing_r_paren() {
^bb:
return loc(callsite( unknown at unknown // expected-error@+1 {{expected ')' in callsite location}}
}
// -----
func @location_fused_missing_greater() {
^bb:
return loc(fused<true [unknown]) // expected-error {{expected '>' after fused location metadata}}
}
// -----
func @location_fused_missing_metadata() {
^bb:
// expected-error@+1 {{expected non-function type}}
return loc(fused<) // expected-error {{expected valid attribute metadata}}
}
// -----
func @location_fused_missing_l_square() {
^bb:
return loc(fused<true>unknown]) // expected-error {{expected '[' in fused location}}
}
// -----
func @location_fused_missing_r_square() {
^bb:
return loc(fused[unknown) // expected-error {{expected ']' in fused location}}
}