Implement two more transforms of atomicrmw in InstCombine.
- We can convert an atomicrmw which produces a known value in memory into an xchg instead.
- We can convert an atomicrmw xchg w/o users into a store for some orderings.
Paths
| Differential D58290
Convert atomicrmws to xchg or store where legal ClosedPublic Authored by reames on Feb 15 2019, 9:41 AM.
Details Summary Implement two more transforms of atomicrmw in InstCombine.
Diff Detail
Event TimelineComment Actions A few nits, LGTM otherwise.
This revision is now accepted and ready to land.Feb 15 2019, 9:55 AM reames added inline comments.
Closed by commit rL354170: [InstCombine] Convert atomicrmws to xchg or store where legal (authored by reames). · Explain WhyFeb 15 2019, 1:30 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 187075 llvm/trunk/lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp
llvm/trunk/test/Transforms/InstCombine/atomicrmw.ll
|