Fix an alignment error in `llvm::expandAtomicRMWToCmpXchg` without breaking the build...
authorRichard Diamond <wichard@vitalitystudios.com>
Thu, 6 Aug 2015 16:55:03 +0000 (16:55 +0000)
committerRichard Diamond <wichard@vitalitystudios.com>
Thu, 6 Aug 2015 16:55:03 +0000 (16:55 +0000)
commitbd753c93157a40a4d99327d544f382dd1828f492
treed0889461d414d046264c0d7496212c123674a8dc
parent10fd03857fe80159c9a82802b17df693b2ea7fe0
Fix an alignment error in `llvm::expandAtomicRMWToCmpXchg` without breaking the build where X86 isn't enabled.

Summary: Divide the primitive size in bits by eight so the initial load's alignment is in bytes as expected. Tested with the included unit test.

Reviewers: rengolin, jfb

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D11804

llvm-svn: 244229
llvm/lib/CodeGen/AtomicExpandPass.cpp
llvm/test/Transforms/AtomicExpand/X86/expand-atomic-rmw-initial-load.ll [new file with mode: 0644]
llvm/test/Transforms/AtomicExpand/X86/lit.local.cfg [new file with mode: 0644]