[PATCH] D103232: [AtomicExpandPass][AArch64] Promote xchg with floating-point types to integer ones

LemonBoy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 27 02:36:29 PDT 2021


LemonBoy created this revision.
LemonBoy added reviewers: efriedma, aemerson, lenary.
Herald added subscribers: danielkiss, pengfei, jfb, hiraditya, kristof.beyls.
LemonBoy requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Follow the same strategy used for atomic loads/stores by converting the operands to equally-sized integer types.
This change prevents the atomic expansion pass from generating illegal LL/SC pairs when targeting AArch64: `expand-atomicrmw-xchg-fp.ll` would previously instantiate intrinsics such as `llvm.aarch64.ldaxr.p0f32` that cannot be lowered.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D103232

Files:
  llvm/lib/CodeGen/AtomicExpandPass.cpp
  llvm/test/CodeGen/AArch64/atomicrmw-xchg-fp.ll
  llvm/test/CodeGen/X86/atomicf128.ll
  llvm/test/Transforms/AtomicExpand/AArch64/expand-atomicrmw-xchg-fp.ll
  llvm/test/Transforms/AtomicExpand/X86/expand-atomic-xchg-fp.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103232.348193.patch
Type: text/x-patch
Size: 17860 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210527/1c2b159e/attachment.bin>


More information about the llvm-commits mailing list