[LLVMbugs] [Bug 17417] big vector causes code explosion (no looping with vector attributes?)
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Sep 30 16:13:19 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=17417
Eli Friedman <sharparrow1 at yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |sharparrow1 at yahoo.com
Resolution|--- |INVALID
--- Comment #3 from Eli Friedman <sharparrow1 at yahoo.com> ---
ext_vector_type is supposed to be used to represent a machine vector type or
something like it; the generated code is always straight-line code, with no
loops. If you expect the generated code to contain a loop, you should write a
loop, and it will (hopefully) be vectorized for you. For example:
void foo(float* restrict x, float * restrict y) {
for (unsigned i = 0; i < 800; ++i)
*x++ += *y++;
}
[...]
movups -16(%rdi,%rax,4), %xmm0
movups -16(%rsi,%rax,4), %xmm1
addps %xmm0, %xmm1
movups (%rdi,%rax,4), %xmm0
movups (%rsi,%rax,4), %xmm2
movups %xmm1, -16(%rdi,%rax,4)
addps %xmm0, %xmm2
movups %xmm2, (%rdi,%rax,4)
addq $8, %rax
cmpq $804, %rax ## imm = 0x324
jne LBB0_1
[...]
--
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/20130930/9f1d1259/attachment.html>
More information about the llvm-bugs
mailing list