[PATCH] D78352: [MLIR] Add GenericAtomicRMWOp.

Stephan Herhut via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 20 01:02:31 PDT 2020


herhut added a comment.

Thanks. This looks great to me. Has there been consensus on https://llvm.discourse.group/t/rfc-add-std-atomic-rmw-op/489 yet? There were no more replies but it seems nobody is opposed either.



================
Comment at: mlir/include/mlir/Dialect/StandardOps/IR/Ops.td:507
+    ```mlir
+    x = generic_atomic_rmw %I[%i] : memref<10xf32> {
+      ^bb0(%current_value : f32):
----------------
`x` -> `%x`


================
Comment at: mlir/test/IR/invalid-ops.mlir:1171
+func @atomic_yield_type_mismatch(%I: memref<10xf32>, %i : index) {
+  // expected-error at +4 {{op types mismatch between yield op: 'i32' and its parent: 'f32'}}
+  %x = generic_atomic_rmw %I[%i] : memref<10xf32> {
----------------
Could you add a test for the case where the memref and result types disagree?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78352/new/

https://reviews.llvm.org/D78352





More information about the llvm-commits mailing list