[mlir] Fix bug in use of rewiter for AtomicRMWOp.
authorTres Popp <tpopp@google.com>
Mon, 9 Nov 2020 14:55:08 +0000 (15:55 +0100)
committerTres Popp <tpopp@google.com>
Mon, 9 Nov 2020 15:00:32 +0000 (16:00 +0100)
commit6e8a8c2d7e6c5091ee5c838e8cafafa72dbfca59
tree1328c95796476b2ae3f33bc14598fa23bdb99c80
parente2dcea44890c0f67f376aaa8f477666aa48e1803
[mlir] Fix bug in use of rewiter for AtomicRMWOp.

The legalization did not forward the listener which prevents dynamic
legalization and prevents rollbacks. This handled that and then changed
the associated pass to support all other std ops to support partial
conversion.

Previously, this lowering was failing, but due to the
initial bug, the op's modifications were not reverted, and thus the
pattern matching succeeded.

Differential Revision: https://reviews.llvm.org/D91079
mlir/lib/Dialect/StandardOps/Transforms/ExpandAtomic.cpp