aboutsummaryrefslogtreecommitdiff
path: root/llvm/docs/CommandGuide/llvm-remarkutil.rst
diff options
context:
space:
mode:
authorAlex Bradbury <asb@igalia.com>2023-08-02 09:48:50 +0100
committerAlex Bradbury <asb@igalia.com>2023-08-02 09:48:50 +0100
commitbe0dac268db7f426c26a3cc16f5fbdf96c6cd9e1 (patch)
treeade2f8b81f2b571f413a79cc5f11544375db93fb /llvm/docs/CommandGuide/llvm-remarkutil.rst
parent8af016aefd8391d083cdf745420826ce162a41a5 (diff)
downloadllvm-be0dac268db7f426c26a3cc16f5fbdf96c6cd9e1.zip
llvm-be0dac268db7f426c26a3cc16f5fbdf96c6cd9e1.tar.gz
llvm-be0dac268db7f426c26a3cc16f5fbdf96c6cd9e1.tar.bz2
[RISCV] Improve codegen for i8/i16 'atomicrmw xchg a, {0,-1}'
As noted in <https://github.com/llvm/llvm-project/issues/64090>, it's more efficient to lower a partword 'atomicrmw xchg a, 0` to and amoand with appropriate mask. There are a range of possible ways to go about this - e.g. writing a combine based on the `llvm.riscv.masked.atomicrmw.xchg` intrinsic, or introducing a new interface to AtomicExpandPass to allow target-specific atomics conversions, or trying to lift the conversion into AtomicExpandPass itself based on querying some target hook. Ultimately I've gone with what appears to be the simplest approach - just covering this case in emitMaskedAtomicRMWIntrinsic. I perhaps should have given that hook a different name way back when it was introduced. This also handles the `atomicrmw xchg a, -1` case suggested by Craig during review. Fixes https://github.com/llvm/llvm-project/issues/64090 Differential Revision: https://reviews.llvm.org/D156801
Diffstat (limited to 'llvm/docs/CommandGuide/llvm-remarkutil.rst')
0 files changed, 0 insertions, 0 deletions