[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
Loading
Please sign in to comment