[PATCH] D57854: [InstCombine] Optimize `atomicrmw <op>, 0` into `load atomic` when possible
Quentin Colombet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 12 09:53:43 PST 2019
qcolombet marked an inline comment as done.
qcolombet added inline comments.
Herald added a subscriber: jdoerfert.
================
Comment at: llvm/trunk/lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp:21
+ break;
+ case AtomicRMWInst::Add:
+ case AtomicRMWInst::Sub:
----------------
reames wrote:
> Any plans to handle the other obvious cases such as xor, and, etc?
>
> On the inverse side, we can do the same thing converting to a blind store. e.g. and w/zero, or max w/INT_MAX.
>
> Just curious as to what plans here are.
That would certainly make sense.
I didn't see motivating examples yet, but we could just write test cases that exercises those.
I'll take a look soon-ish unless you beat me at it :).
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57854/new/
https://reviews.llvm.org/D57854
More information about the llvm-commits
mailing list