forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathattributes.mlir
143 lines (117 loc) · 3.12 KB
/
attributes.mlir
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
// RUN: mlir-translate --export-smtlib %s | z3 -in 2>&1 | FileCheck %s
// RUN: mlir-translate --export-smtlib --smtlibexport-inline-single-use-values %s | z3 -in 2>&1 | FileCheck %s
// REQUIRES: z3
// Quantifiers Attributes
smt.solver () : () -> () {
%true = smt.constant true
%7 = smt.exists weight 2 {
^bb0(%arg2: !smt.int, %arg3: !smt.int):
%4 = smt.eq %arg2, %arg3 : !smt.int
%5 = smt.implies %4, %true
smt.yield %5 : !smt.bool
}
smt.assert %7
smt.check sat {} unknown {} unsat {}
}
// CHECK-NOT: WARNING
// CHECK-NOT: warning
// CHECK-NOT: ERROR
// CHECK-NOT: error
// CHECK-NOT: unsat
// CHECK: sat
// Quantifiers Attributes
smt.solver () : () -> () {
%true = smt.constant true
%7 = smt.exists weight 2 {
^bb0(%arg2: !smt.int, %arg3: !smt.int):
%4 = smt.eq %arg2, %arg3 : !smt.int
%5 = smt.implies %4, %true
smt.yield %5 : !smt.bool
} patterns {
^bb0(%arg2: !smt.int, %arg3: !smt.int):
%4 = smt.eq %arg2, %arg3 : !smt.int
smt.yield %4: !smt.bool
}
smt.assert %7
smt.check sat {} unknown {} unsat {}
}
// CHECK-NOT: WARNING
// CHECK-NOT: warning
// CHECK-NOT: ERROR
// CHECK-NOT: error
// CHECK-NOT: unsat
// CHECK: sat
// Quantifiers Attributes
smt.solver () : () -> () {
%true = smt.constant true
%7 = smt.exists {
^bb0(%arg2: !smt.int, %arg3: !smt.int):
%4 = smt.eq %arg2, %arg3 : !smt.int
%5 = smt.implies %4, %true
smt.yield %5 : !smt.bool
} patterns {
^bb0(%arg2: !smt.int, %arg3: !smt.int):
%4 = smt.eq %arg2, %arg3 : !smt.int
smt.yield %4: !smt.bool
}
smt.assert %7
smt.check sat {} unknown {} unsat {}
}
// CHECK-NOT: WARNING
// CHECK-NOT: warning
// CHECK-NOT: ERROR
// CHECK-NOT: error
// CHECK-NOT: unsat
// CHECK: sat
smt.solver () : () -> () {
%true = smt.constant true
%three = smt.int.constant 3
%four = smt.int.constant 4
%7 = smt.exists {
^bb0(%arg2: !smt.int, %arg3: !smt.int):
%4 = smt.eq %arg2, %three: !smt.int
%5 = smt.eq %arg3, %four: !smt.int
%6 = smt.eq %4, %5: !smt.bool
smt.yield %6 : !smt.bool
} patterns {
^bb0(%arg2: !smt.int, %arg3: !smt.int):
%4 = smt.eq %arg2, %three: !smt.int
smt.yield %4: !smt.bool}, {
^bb0(%arg2: !smt.int, %arg3: !smt.int):
%5 = smt.eq %arg3, %four: !smt.int
smt.yield %5: !smt.bool
}
smt.assert %7
smt.check sat {} unknown {} unsat {}
}
// CHECK-NOT: WARNING
// CHECK-NOT: warning
// CHECK-NOT: ERROR
// CHECK-NOT: error
// CHECK-NOT: unsat
// CHECK: sat
smt.solver () : () -> () {
%true = smt.constant true
%three = smt.int.constant 3
%four = smt.int.constant 4
%10 = smt.exists {
^bb0(%arg2: !smt.int, %arg3: !smt.int):
%4 = smt.eq %arg2, %three: !smt.int
%5 = smt.eq %arg3, %four: !smt.int
%9 = smt.eq %4, %5: !smt.bool
smt.yield %9 : !smt.bool
} patterns {
^bb0(%arg2: !smt.int, %arg3: !smt.int):
%4 = smt.eq %arg2, %three: !smt.int
%5 = smt.eq %arg3, %four: !smt.int
smt.yield %4, %5: !smt.bool, !smt.bool
}
smt.assert %10
smt.check sat {} unknown {} unsat {}
}
// CHECK-NOT: WARNING
// CHECK-NOT: warning
// CHECK-NOT: ERROR
// CHECK-NOT: error
// CHECK-NOT: unsat
// CHECK: sat