[llvm-bugs] [Bug 27630] New: LLVM generates SIMD instructions on copying a large object which is slow.
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue May 3 16:23:48 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=27630
Bug ID: 27630
Summary: LLVM generates SIMD instructions on copying a large
object which is slow.
Product: new-bugs
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: congh at google.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
LLVM generates SSE instructions (on x86 each movaps copies 16 bytes) on copying
a large object for the following code, which underperforms GCC's generated code
in which each mov instruction copies 8 bytes:
struct A {
int a[16];
};
constexpr int N = 10000;
A a[N], b[N];
int main() {
for (int j = 0; j < 1000; ++j) {
for (int i = 0; i < N; ++i) {
a[i] = b[i];
}
}
}
Running time (on a Haswell machine):
LLVM: 0.071s
GCC: 0.039s
The performance becomes worse if we don't unroll the loop.
--
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/20160503/0a964a41/attachment.html>
More information about the llvm-bugs
mailing list