[PATCH] D101163: [AArch64] Prevent spilling between ldxr/stxr pairs

LemonBoy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 23 07:16:26 PDT 2021


LemonBoy created this revision.
LemonBoy added reviewers: t.p.northover, aemerson, arsenm.
Herald added subscribers: tmatheson, danielkiss, jfb, hiraditya, kristof.beyls.
LemonBoy requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

Apply the same logic used to check if CMPXCHG nodes should be expanded at `-O0`: the register allocator may end up spilling some register in between the atomic load/store pairs, breaking the atomicity and possibly stalling the execution.

Fixes PR48017


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D101163

Files:
  llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
  llvm/test/CodeGen/AArch64/atomicrmw-O0.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101163.340016.patch
Type: text/x-patch
Size: 12265 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210423/cb249d3c/attachment.bin>


More information about the llvm-commits mailing list