[PATCH] D21029: Support expanding partial-word cmpxchg to full-word cmpxchg in AtomicExpandPass.
James Y Knight via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 6 09:40:08 PDT 2016
jyknight created this revision.
jyknight added a subscriber: llvm-commits.
Herald added a subscriber: jyknight.
Many CPUs only have 4-byte cmpxchg, and not 1/2-byte instructions. For
those, you need to mask and shift appropriately and use a 4-byte
cmpxchg.
This change adds support for cmpxchg-based instruction sets (only SPARC,
in LLVM). The support can be extended for LL/SC-based instruction
sets (e.g. PPC and MIPS) in the future, supplanting the ISel expansions
those architectures currently use.
Tests added for SPARCv9.
http://reviews.llvm.org/D21029
Files:
include/llvm/Target/TargetLowering.h
lib/CodeGen/AtomicExpandPass.cpp
lib/CodeGen/TargetLoweringBase.cpp
lib/Target/Sparc/SparcISelLowering.cpp
test/CodeGen/SPARC/atomics.ll
test/Transforms/AtomicExpand/SPARC/partword.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21029.59740.patch
Type: text/x-patch
Size: 36751 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160606/572160f9/attachment.bin>
More information about the llvm-commits
mailing list