OSDN Git Service

[WebAssembly] Enable atomic expansion for unsupported atomicrmws
authorHeejin Ahn <aheejin@gmail.com>
Tue, 7 Aug 2018 00:22:22 +0000 (00:22 +0000)
committerHeejin Ahn <aheejin@gmail.com>
Tue, 7 Aug 2018 00:22:22 +0000 (00:22 +0000)
commit3e2cfa03da4e5c5d09a3a1f1d57904cd47f2d5ca
tree92513c747dc57709f7618f017294a5b6dd48e7e5
parent7e13b7e2965d11ecf3258edbce6dcefabc6fb5a9
[WebAssembly] Enable atomic expansion for unsupported atomicrmws

Summary:
Wasm does not have direct counterparts to some of LLVM IR's atomicrmw
instructions (min, max, umin, umax, and nand). This enables atomic
expansion using cmpxchg instruction within a loop for those atomicrmw
instructions.

Reviewers: dschuff

Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339084 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
lib/Target/WebAssembly/WebAssemblyISelLowering.h
lib/Target/WebAssembly/WebAssemblyInstrAtomics.td
test/CodeGen/WebAssembly/atomic-rmw.ll