Skip to content
Commit 3e998ede authored by Noah Goldstein's avatar Noah Goldstein
Browse files

[X86] Lower used `(atomicrmw xor p, SignBit)` as `(atomicrmw add p, SignBit)`

`(xor X, SignBit)` == `(add X, SignBit)`. For atomics whose result is
used, the `add` option is preferable because of the `xadd` instruction
which allows us to avoid either a CAS loop or a `btc; setcc; shl`.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D149689
parent 38869852
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment