[TRITON-MLIR][FRONTEND]minor fix to run through atomic_cas test (#925)

Co-authored-by: dongdongl <dongdongl@nvidia.com>
This commit is contained in:
donproc
2022-12-01 21:43:26 +08:00
committed by GitHub
parent 7d90a07d0b
commit 9def1bcebf
2 changed files with 21 additions and 32 deletions

View File

@@ -528,8 +528,7 @@ class CodeGenerator(ast.NodeVisitor):
[ty.to_ir(self.builder) for ty in ret_types])
loop_block.merge_block_before(after_block)
self.builder.set_insertion_point_to_end(after_block)
if len(yields) > 0:
self.builder.create_yield_op([y.handle for y in yields])
self.builder.create_yield_op([y.handle for y in yields])
# update global uses in while_op
for i, name in enumerate(names):