[PATCH] D101349: AArch64: support i128 cmpxchg in GlobalISel.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 14 11:01:05 PDT 2021


efriedma added a comment.

In D101349#2759075 <https://reviews.llvm.org/D101349#2759075>, @t.p.northover wrote:

>> This might be a bit crazy, but instead of emitting CASPX directly from globalisel, did you consider just emitting CMP_SWAP_128, then converting it to CASPX after isel?
>
> Unforuntately that won't work. The reason `CMP_SWAP_128` works so easily is that its 64-bit register operands can be chosen independently (because `LDXP/STXP` allow that), `CASP` needs them to be consecutive (and the first one to be even).

I don't see any reason it can't work, as long as you make sure to do the conversion before regalloc.  (After regalloc would be a problem for the reason you note.)


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

https://reviews.llvm.org/D101349



More information about the llvm-commits mailing list