summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Parser/Parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/lib/Parser/Parser.cpp')
-rw-r--r--mlir/lib/Parser/Parser.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/mlir/lib/Parser/Parser.cpp b/mlir/lib/Parser/Parser.cpp
index ecb7fbc779e..c477ad1bbc5 100644
--- a/mlir/lib/Parser/Parser.cpp
+++ b/mlir/lib/Parser/Parser.cpp
@@ -3201,7 +3201,8 @@ ParseResult FunctionParser::parseForInst() {
ubOperands, ubMap, step);
// Create SSA value definition for the induction variable.
- if (addDefinition({inductionVariableName, 0, loc}, forInst))
+ if (addDefinition({inductionVariableName, 0, loc},
+ forInst->getInductionVar()))
return ParseFailure;
// Try to parse the optional trailing location.
@@ -3347,7 +3348,7 @@ ParseResult FunctionParser::parseBound(SmallVectorImpl<Value *> &operands,
// Create an identity map using dim id for an induction variable and
// symbol otherwise. This representation is optimized for storage.
// Analysis passes may expand it into a multi-dimensional map if desired.
- if (isa<ForInst>(operands[0]))
+ if (isForInductionVar(operands[0]))
map = builder.getDimIdentityMap();
else
map = builder.getSymbolIdentityMap();
OpenPOWER on IntegriCloud