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)
commit972533b0a146a8af51174bd06e1b706b74f816e8
treecff921dbbc87b70a5519bd27bb33773651465df4
parent3c4339b0dcf789193b23b6fde28e1e22b8c7455e
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244229 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/AtomicExpandPass.cpp
test/Transforms/AtomicExpand/X86/expand-atomic-rmw-initial-load.ll [new file with mode: 0644]
test/Transforms/AtomicExpand/X86/lit.local.cfg [new file with mode: 0644]