[llvm-bugs] [Bug 32392] New: Power i32/i64 atomic acquire load lowers to lwsync, not isync
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Mar 23 05:47:30 PDT 2017
http://bugs.llvm.org/show_bug.cgi?id=32392
Bug ID: 32392
Summary: Power i32/i64 atomic acquire load lowers to lwsync,
not isync
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: PowerPC
Assignee: unassignedbugs at nondot.org
Reporter: timshen91 at gmail.com
CC: llvm-bugs at lists.llvm.org
GCC lowers acquire load of i32/i64 to isync, but llvm lowers them to lwsync.
Here's the explanation:
http://www.rdrop.com/~paulmck/scalability/paper/N2745r.2011.03.04a.html
A casually written benchmark also shows that isync approach is faster:
GCC:
Benchmark Time(ns) CPU(ns) Iterations
---------------------------------------------------------------------
BM_Acquire32/threads:1 2.74 2.74 256555796
BM_Acquire32/threads:2 1.40 2.80 228185266
BM_Acquire32/threads:4 1.25 4.98 124786836
BM_Acquire32/threads:176 0.240 8.17 78115312
BM_Acquire64/threads:1 5.42 5.41 166593868
BM_Acquire64/threads:2 2.47 4.07 199450866
BM_Acquire64/threads:4 1.17 3.22 182357912
BM_Acquire64/threads:176 0.209 6.76 94368384
LLVM:
Benchmark Time(ns) CPU(ns) Iterations
---------------------------------------------------------------------
BM_Acquire32/threads:1 8.45 8.44 70487873
BM_Acquire32/threads:2 2.75 5.49 93091058
BM_Acquire32/threads:4 5.56 22.2 31810768
BM_Acquire32/threads:176 1.14 37.4 17600000
BM_Acquire64/threads:1 6.71 6.71 100000000
BM_Acquire64/threads:2 4.01 8.00 63776730
BM_Acquire64/threads:4 5.57 22.2 31363992
BM_Acquire64/threads:176 1.41 36.9 17600000
--
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/20170323/2c87f9df/attachment-0001.html>
More information about the llvm-bugs
mailing list