mirror of
https://github.com/intel/llvm.git
synced 2026-01-13 19:08:21 +08:00
[MLIR][Python] Fix AffineIfOp insertion point (#171957)
This bug was introduced by #108323, where the loc and ip were not properly set. It may lead to errors when the operations are not linearly asserted to the IR.
This commit is contained in:
@@ -198,7 +198,7 @@ class AffineIfOp(AffineIfOp):
|
||||
results = []
|
||||
results.extend(results_)
|
||||
|
||||
super().__init__(results, cond_operands, cond)
|
||||
super().__init__(results, cond_operands, cond, loc=loc, ip=ip)
|
||||
self.regions[0].blocks.append(*[])
|
||||
if has_else:
|
||||
self.regions[1].blocks.append(*[])
|
||||
|
||||
Reference in New Issue
Block a user