blob: d1368535234022189a0134568b4c40a0616767e1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# RUN: %PYTHON %s | FileCheck %s
from mlir.ir import *
from mlir.dialects.openmp import *
def constructAndPrintInModule(f):
print("\nTEST:", f.__name__)
with Context(), Location.unknown():
module = Module.create()
with InsertionPoint(module.body):
f()
print(module)
return f
# CHECK-LABEL: test_barrier
# CHECK: module {
# CHECK: omp.barrier
# CHECK: }
@constructAndPrintInModule
def test_barrier():
barrier = BarrierOp()
|