[Mlir-commits] [mlir] de71b46 - Add missing parsing for attributes to std.generic_atomic_rmw op
Mehdi Amini
llvmlistbot at llvm.org
Sun Aug 16 15:14:13 PDT 2020
Author: Mehdi Amini
Date: 2020-08-16T22:13:58Z
New Revision: de71b46a519db014ce906a39f8a0e1b235ef1568
URL: https://github.com/llvm/llvm-project/commit/de71b46a519db014ce906a39f8a0e1b235ef1568
DIFF: https://github.com/llvm/llvm-project/commit/de71b46a519db014ce906a39f8a0e1b235ef1568.diff
LOG: Add missing parsing for attributes to std.generic_atomic_rmw op
Fix llvm.org/pr47182
Differential Revision: https://reviews.llvm.org/D86030
Added:
Modified:
mlir/lib/Dialect/StandardOps/IR/Ops.cpp
mlir/test/IR/core-ops.mlir
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/StandardOps/IR/Ops.cpp b/mlir/lib/Dialect/StandardOps/IR/Ops.cpp
index b59357385fdc..447e500deb95 100644
--- a/mlir/lib/Dialect/StandardOps/IR/Ops.cpp
+++ b/mlir/lib/Dialect/StandardOps/IR/Ops.cpp
@@ -564,7 +564,8 @@ static ParseResult parseGenericAtomicRMWOp(OpAsmParser &parser,
return failure();
Region *body = result.addRegion();
- if (parser.parseRegion(*body, llvm::None, llvm::None))
+ if (parser.parseRegion(*body, llvm::None, llvm::None) ||
+ parser.parseOptionalAttrDict(result.attributes))
return failure();
result.types.push_back(memrefType.cast<MemRefType>().getElementType());
return success();
diff --git a/mlir/test/IR/core-ops.mlir b/mlir/test/IR/core-ops.mlir
index c45683c082e8..89bcd75ffa2a 100644
--- a/mlir/test/IR/core-ops.mlir
+++ b/mlir/test/IR/core-ops.mlir
@@ -839,7 +839,8 @@ func @generic_atomic_rmw(%I: memref<1x2xf32>, %i : index, %j : index) {
%c1 = constant 1.0 : f32
%out = addf %c1, %old_value : f32
atomic_yield %out : f32
- }
+ // CHECK: index_attr = 8 : index
+ } { index_attr = 8 : index }
return
}
More information about the Mlir-commits
mailing list