HomePhabricator

[MLIR] LLVM Dialect: add llvm.cmpxchg and improve llvm.atomicrmw custom parser

Authored by flaub on Jan 21 2020, 12:22 AM.

Description

[MLIR] LLVM Dialect: add llvm.cmpxchg and improve llvm.atomicrmw custom parser

Summary:
Add a llvm.cmpxchg op as a counterpart to LLVM IR's cmpxchg instruction.
Note that the weak, volatile, and syncscope attributes are not yet supported.

This will be useful for upcoming parallel versions of affine.for and generally
for reduction-like semantics (especially for reductions that can't make use
of atomicrmw, e.g. fmax).

Reviewers: ftynse, nicolasvasilache

Reviewed By: ftynse

Subscribers: merge_guards_bot, jfb, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, arpith-jacob, mgester, lucyrfox, liufengdb, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72995

Details

Committed
flaubJan 21 2020, 1:09 AM
Reviewer
ftynse
Differential Revision
D72995: [MLIR] LLVM Dialect: add llvm.cmpxchg and improve llvm.atomicrmw custom parser
Parents
rG65f6ee618e72: [gn build] Port a80291ce10b
Branches
Unknown
Tags
Unknown