summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Transforms/LowerAffine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/lib/Transforms/LowerAffine.cpp')
-rw-r--r--mlir/lib/Transforms/LowerAffine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/mlir/lib/Transforms/LowerAffine.cpp b/mlir/lib/Transforms/LowerAffine.cpp
index 99ee603bb05..94f300bd16a 100644
--- a/mlir/lib/Transforms/LowerAffine.cpp
+++ b/mlir/lib/Transforms/LowerAffine.cpp
@@ -348,7 +348,7 @@ bool LowerAffinePass::lowerForInst(ForInst *forInst) {
oldBody->begin(), oldBody->end());
// The code in the body of the forInst now uses 'iv' as its indvar.
- forInst->replaceAllUsesWith(iv);
+ forInst->getInductionVar()->replaceAllUsesWith(iv);
// Append the induction variable stepping logic and branch back to the exit
// condition block. Construct an affine expression f : (x -> x+step) and
OpenPOWER on IntegriCloud