mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-13 17:20:28 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244205 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
47e91a8102
commit
7809bb2e96
@ -550,7 +550,7 @@ bool llvm::expandAtomicRMWToCmpXchg(AtomicRMWInst *AI,
|
||||
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.
|
||||
|
@ -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
|
Loading…
x
Reference in New Issue
Block a user