From: Mehdi Amini Date: Sat, 15 Aug 2020 23:58:32 +0000 (+0000) Subject: Add missing parsing for attributes to std.generic_atomic_rmw op X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=de71b46a519db014ce906a39f8a0e1b235ef1568;p=platform%2Fupstream%2Fllvm.git Add missing parsing for attributes to std.generic_atomic_rmw op Fix llvm.org/pr47182 Differential Revision: https://reviews.llvm.org/D86030 --- diff --git a/mlir/lib/Dialect/StandardOps/IR/Ops.cpp b/mlir/lib/Dialect/StandardOps/IR/Ops.cpp index b593573..447e500 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().getElementType()); return success(); diff --git a/mlir/test/IR/core-ops.mlir b/mlir/test/IR/core-ops.mlir index c45683c..89bcd75f 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 }