aboutsummaryrefslogtreecommitdiff
path: root/mlir/test/python/ir/operation.py
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/test/python/ir/operation.py')
-rw-r--r--mlir/test/python/ir/operation.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/mlir/test/python/ir/operation.py b/mlir/test/python/ir/operation.py
index 4a3625c..cb4cfc8c 100644
--- a/mlir/test/python/ir/operation.py
+++ b/mlir/test/python/ir/operation.py
@@ -696,6 +696,7 @@ def testOperationPrint():
# CHECK: resource1: "0x08
module.operation.print(large_elements_limit=2)
+
# CHECK-LABEL: TEST: testKnownOpView
@run
def testKnownOpView():
@@ -969,6 +970,13 @@ def testOperationLoc():
assert op.location == loc
assert op.operation.location == loc
+ another_loc = Location.name("another_loc")
+ op.location = another_loc
+ assert op.location == another_loc
+ assert op.operation.location == another_loc
+ # CHECK: loc("another_loc")
+ print(op.location)
+
# CHECK-LABEL: TEST: testModuleMerge
@run