[PATCH] [X86] Use the generic AtomicExpandPass instead of X86AtomicExpandPass

JF Bastien jfb at chromium.org
Sat Aug 30 13:21:08 PDT 2014


================
Comment at: lib/CodeGen/AtomicExpandPass.cpp:298
@@ +297,3 @@
+  LoadInst *InitLoaded = Builder.CreateLoad(Addr);
+  InitLoaded->setAlignment(AI->getType()->getPrimitiveSizeInBits());
+  Builder.CreateBr(LoopBB);
----------------
Could you also explain the rationale behind the alignment (C11/C++11 memory model requires at least natural alignment, and the IR has the same guarantee).

http://reviews.llvm.org/D5090






More information about the llvm-commits mailing list