[LLVMbugs] [Bug 3497] New: memory barriers not lowered correctly on x86/x86-64
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Fri Feb 6 02:08:06 PST 2009
http://llvm.org/bugs/show_bug.cgi?id=3497
Summary: memory barriers not lowered correctly on x86/x86-64
Product: new-bugs
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: edwintorok at gmail.com
CC: llvmbugs at cs.uiuc.edu
__sync_synchronize is lowered to nothing on x86/x86-64, while gcc lowers it to
mfence.
Testcase:
void foo() { __sync_synchronize(); }
LLVM-IR:
; ModuleID = 'x.c'
target datalayout =
"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
target triple = "x86_64-unknown-linux-gnu"
define void @foo() nounwind {
entry:
tail call void @llvm.memory.barrier(i1 true, i1 true, i1 true, i1 true,
i1 false)
ret void
}
declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
Assembly:
foo:
nop
ret
.size foo, .-foo
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list