[PATCH] D58242: Teach instcombine about remaining idemptotent atomicrmw types

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 14 09:53:40 PST 2019


qcolombet added a comment.

LGTM, one nitpick below.

Nice catch for the alignment stuff!



================
Comment at: lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp:53
+Instruction *InstCombiner::visitAtomicRMWInst(AtomicRMWInst &RMWI) {
+  if (!isIdempotentRMW(RMWI))
+    return nullptr;
----------------
IIRC to be pedantic idempotent is when something doesn't change when multiplied by itself, hence this name could be misleading (though I could remember wrong :P).


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58242/new/

https://reviews.llvm.org/D58242





More information about the llvm-commits mailing list