summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp b/llvm/lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp
index b607c6dd608..37c43977d90 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp
@@ -51,6 +51,12 @@ bool isIdempotentRMW(AtomicRMWInst& RMWI) {
Instruction *InstCombiner::visitAtomicRMWInst(AtomicRMWInst &RMWI) {
+ // TODO: Any atomicrmw op which produces a known result in memory can be
+ // replaced w/an atomicrmw xchg. (see getBinOpAbsorber)
+
+ // TODO: Any atomicrmw xchg with no uses can be converted to a atomic store
+ // if the ordering is compatible.
+
if (!isIdempotentRMW(RMWI))
return nullptr;
OpenPOWER on IntegriCloud