[PATCH] D11783: Fix an alignment error in `llvm::expandAtomicRMWToCmpXchg`.
JF Bastien
jfb at chromium.org
Wed Aug 5 15:08:47 PDT 2015
jfb accepted this revision.
jfb added subscribers: morisset, reames.
jfb added a comment.
This revision is now accepted and ready to land.
lgtm
Adding @morisset and @reames as FYI.
================
Comment at: lib/CodeGen/AtomicExpandPass.cpp:553
@@ -552,3 +552,3 @@
// Atomics require at least natural alignment.
- InitLoaded->setAlignment(AI->getType()->getPrimitiveSizeInBits());
+ InitLoaded->setAlignment(AI->getType()->getPrimitiveSizeInBits() / 8);
Builder.CreateBr(LoopBB);
----------------
In a separate patch please also make this atomic! The comment above says that's what the generated code does... but it's not :-)
Repository:
rL LLVM
http://reviews.llvm.org/D11783
More information about the llvm-commits
mailing list