diff options
| author | Hongzheng Chen <hc676@cornell.edu> | 2025-12-11 23:23:46 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-11 20:23:46 -0800 |
| commit | 1335a05ab8bc8339ce24be3a9da89d8c3f4e0571 (patch) | |
| tree | 9cddf7b782eaea2657d171e903789b4dd1ead0b3 /mlir/python | |
| parent | ecaf673850beb241957352bd61e95ed34256635f (diff) | |
| download | llvm-1335a05ab8bc8339ce24be3a9da89d8c3f4e0571.zip llvm-1335a05ab8bc8339ce24be3a9da89d8c3f4e0571.tar.gz llvm-1335a05ab8bc8339ce24be3a9da89d8c3f4e0571.tar.bz2 | |
[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.
Diffstat (limited to 'mlir/python')
| -rw-r--r-- | mlir/python/mlir/dialects/affine.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mlir/python/mlir/dialects/affine.py b/mlir/python/mlir/dialects/affine.py index 7641d36..5767a00 100644 --- a/mlir/python/mlir/dialects/affine.py +++ b/mlir/python/mlir/dialects/affine.py @@ -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(*[]) |
