[LLVMbugs] [Bug 17611] New: Emit cmpxchg16b loops for i128 atomicrmw instructions when mattr=+cx16
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Oct 18 01:08:07 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=17611
Bug ID: 17611
Summary: Emit cmpxchg16b loops for i128 atomicrmw instructions
when mattr=+cx16
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Backend: X86
Assignee: unassignedbugs at nondot.org
Reporter: david.majnemer at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
consider:
define void @test(i128* %a) nounwind {
entry:
%0 = cmpxchg i128* %a, i128 1, i128 1 seq_cst
%1 = atomicrmw xchg i128* %a, i128 1 seq_cst
%2 = atomicrmw add i128* %a, i128 1 seq_cst
%3 = atomicrmw sub i128* %a, i128 1 seq_cst
%4 = atomicrmw and i128* %a, i128 1 seq_cst
%5 = atomicrmw nand i128* %a, i128 1 seq_cst
%6 = atomicrmw or i128* %a, i128 1 seq_cst
%7 = atomicrmw xor i128* %a, i128 1 seq_cst
ret void
}
compile with:
~/llvm/build/bin/llc /var/tmp/PR17481.ll -o - -mattr=+cx16 -march=x86-64
-mcpu=corei7
note that we are emitting libcalls for atomicrmw instructions instead of doing
something like:
.L6:
movq %rax, %rbx
movq %rdx, %rcx
orq $1, %rbx
lock cmpxchg16b -16(%rsp)
jne .L6
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20131018/7485e0d7/attachment.html>
More information about the llvm-bugs
mailing list