Skip to content

Commit cac248c

Browse files
committed
add test
1 parent 1faa5e2 commit cac248c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

mlir/test/python/ir/operation.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,3 +1187,15 @@ def callback(op):
11871187
module.operation.walk(callback)
11881188
except RuntimeError:
11891189
print("Exception raised")
1190+
1191+
1192+
# CHECK-LABEL: TEST: testGetOwnerConcreteOpview
1193+
@run
1194+
def testGetOwnerConcreteOpview():
1195+
with Context() as ctx, Location.unknown():
1196+
module = Module.create()
1197+
with InsertionPoint(module.body):
1198+
a = arith.ConstantOp(value=42, result=IntegerType.get_signless(32))
1199+
r = arith.AddIOp(a, a, overflowFlags=arith.IntegerOverflowFlags.nsw)
1200+
for u in a.result.uses:
1201+
assert isinstance(u.owner, arith.AddIOp)

0 commit comments

Comments
 (0)