[Mlir-commits] [mlir] b7162e1 - [mlir] Fix incorrect access to the Optional<ArrayAttr> underlying values.
Alexander Belyaev
llvmlistbot at llvm.org
Fri Nov 11 01:46:53 PST 2022
Author: Alexander Belyaev
Date: 2022-11-11T10:46:04+01:00
New Revision: b7162e136edfbe7157e9341d4322705e50601796
URL: https://github.com/llvm/llvm-project/commit/b7162e136edfbe7157e9341d4322705e50601796
DIFF: https://github.com/llvm/llvm-project/commit/b7162e136edfbe7157e9341d4322705e50601796.diff
LOG: [mlir] Fix incorrect access to the Optional<ArrayAttr> underlying values.
Added:
Modified:
mlir/lib/Dialect/SCF/IR/SCF.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/SCF/IR/SCF.cpp b/mlir/lib/Dialect/SCF/IR/SCF.cpp
index e32f671f41a9d..0cca4bcbb0ece 100644
--- a/mlir/lib/Dialect/SCF/IR/SCF.cpp
+++ b/mlir/lib/Dialect/SCF/IR/SCF.cpp
@@ -1114,7 +1114,7 @@ LogicalResult ForeachThreadOp::verify() {
if (body->getArgument(i + getRank()).getType() != getOutputs()[i].getType())
return emitOpError("type mismatch between ")
<< i << "-th output and corresponding block argument";
- if (getMapping().has_value())
+ if (getMapping()->getValue())
for (auto map : getMapping().value()) {
if (!isa<DeviceMappingAttrInterface>(map))
return emitOpError()
More information about the Mlir-commits
mailing list