OSDN Git Service

[InstCombine] Convert atomicrmws to xchg or store where legal
authorPhilip Reames <listmail@philipreames.com>
Fri, 15 Feb 2019 21:23:51 +0000 (21:23 +0000)
committerPhilip Reames <listmail@philipreames.com>
Fri, 15 Feb 2019 21:23:51 +0000 (21:23 +0000)
commit5c802fd2ca4f5fcf920c93a9786e802a0054ab72
tree324a190152438692333cd304a98e0a61d39524db
parent92fd2811692730d1d60466be26c949fd42e2bb74
[InstCombine] Convert atomicrmws to xchg or store where legal

Implement two more transforms of atomicrmw:
1) We can convert an atomicrmw which produces a known value in memory into an xchg instead.
2) We can convert an atomicrmw xchg w/o users into a store for some orderings.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354170 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp
test/Transforms/InstCombine/atomicrmw.ll