aboutsummaryrefslogtreecommitdiff
path: root/mlir/lib/Interfaces/InferTypeOpInterface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/lib/Interfaces/InferTypeOpInterface.cpp')
-rw-r--r--mlir/lib/Interfaces/InferTypeOpInterface.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/mlir/lib/Interfaces/InferTypeOpInterface.cpp b/mlir/lib/Interfaces/InferTypeOpInterface.cpp
index 3c50c4c..ee4c051 100644
--- a/mlir/lib/Interfaces/InferTypeOpInterface.cpp
+++ b/mlir/lib/Interfaces/InferTypeOpInterface.cpp
@@ -240,8 +240,9 @@ LogicalResult mlir::detail::verifyInferredResultTypes(Operation *op) {
auto retTypeFn = cast<InferTypeOpInterface>(op);
auto result = retTypeFn.refineReturnTypes(
op->getContext(), op->getLoc(), op->getOperands(),
- op->getDiscardableAttrDictionary(), op->getPropertiesStorage(),
- op->getRegions(), inferredReturnTypes);
+ op->getPropertiesStorage() ? op->getDiscardableAttrDictionary()
+ : op->getAttrDictionary(),
+ op->getPropertiesStorage(), op->getRegions(), inferredReturnTypes);
if (failed(result))
op->emitOpError() << "failed to infer returned types";