[PATCH] D129838: [LoongArch] Optimize the atomic store with amswap_db.[w/d]

Gong LingQin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 15 00:23:02 PDT 2022


gonglingqin created this revision.
gonglingqin added reviewers: xry111, SixWeining, MaskRay, xen0n, lkail.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
gonglingqin requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

When AtomicOrdering is release or stronger, use

  amswap_db.[w/d] $zero, $a1, $a0

instead of

  dbar 0
  st.[w/d] $a0, $a1, 0

Thanks to @xry111 for the suggestion: https://reviews.llvm.org/D128901#3626635


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D129838

Files:
  llvm/lib/Target/LoongArch/LoongArchISelLowering.h
  llvm/lib/Target/LoongArch/LoongArchInstrInfo.td
  llvm/test/CodeGen/LoongArch/ir-instruction/load-store-atomic.ll
  llvm/test/Transforms/AtomicExpand/LoongArch/load-store-atomic.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129838.444896.patch
Type: text/x-patch
Size: 11277 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220715/9e30ebdd/attachment.bin>


More information about the llvm-commits mailing list