[llvm] r244205 - Revert "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."
Renato Golin via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 6 03:38:00 PDT 2015
Author: rengolin
Date: Thu Aug 6 05:37:59 2015
New Revision: 244205
URL: http://llvm.org/viewvc/llvm-project?rev=244205&view=rev
Log:
Revert "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."
This reverts commit r244155, as it was breaking the buildbots for too long.
Should be reapplied with proper fix.
Removed:
llvm/trunk/test/Transforms/AtomicExpand/expand-atomic-rmw-initial-load.ll
Modified:
llvm/trunk/lib/CodeGen/AtomicExpandPass.cpp
Modified: llvm/trunk/lib/CodeGen/AtomicExpandPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AtomicExpandPass.cpp?rev=244205&r1=244204&r2=244205&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AtomicExpandPass.cpp (original)
+++ llvm/trunk/lib/CodeGen/AtomicExpandPass.cpp Thu Aug 6 05:37:59 2015
@@ -550,7 +550,7 @@ bool llvm::expandAtomicRMWToCmpXchg(Atom
Builder.SetInsertPoint(BB);
LoadInst *InitLoaded = Builder.CreateLoad(Addr);
// Atomics require at least natural alignment.
- InitLoaded->setAlignment(AI->getType()->getPrimitiveSizeInBits() / 8);
+ InitLoaded->setAlignment(AI->getType()->getPrimitiveSizeInBits());
Builder.CreateBr(LoopBB);
// Start the main loop block now that we've taken care of the preliminaries.
Removed: llvm/trunk/test/Transforms/AtomicExpand/expand-atomic-rmw-initial-load.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/AtomicExpand/expand-atomic-rmw-initial-load.ll?rev=244204&view=auto
==============================================================================
--- llvm/trunk/test/Transforms/AtomicExpand/expand-atomic-rmw-initial-load.ll (original)
+++ llvm/trunk/test/Transforms/AtomicExpand/expand-atomic-rmw-initial-load.ll (removed)
@@ -1,8 +0,0 @@
-; RUN: opt -S %s -atomic-expand -mtriple=i686-linux-gnu | FileCheck %s
-
-define i8 @test_initial_load(i8* %ptr, i8 %value) {
- %res = atomicrmw nand i8* %ptr, i8 %value seq_cst
- ret i8 %res
-}
-; CHECK-LABEL: @test_initial_load
-; CHECK-NEXT: %1 = load i8, i8* %ptr, align 1
More information about the llvm-commits
mailing list