<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - big vector causes code explosion (no looping with vector attributes?)"
   href="http://llvm.org/bugs/show_bug.cgi?id=17417">17417</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>big vector causes code explosion (no looping with vector attributes?)
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>kkhoo@perfwizard.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Apologies if I've misunderstood the intent of the 'ext_vector_type' attribute,
but I did not expect the following source code to generate over 4KB of machine
code:

$ cat vecadd.c
typedef float big_float_vector __attribute__((ext_vector_type(800)));

big_float_vector foo(big_float_vector x, big_float_vector y) {
    return x + y;
}

$ ./clang -Os -S -fomit-frame-pointer vecadd.c -o - -emit-llvm
; ModuleID = 'vecadd.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-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.7.0"

; Function Attrs: nounwind optsize readonly ssp uwtable
define <800 x float> @foo(<800 x float>* byval nocapture readonly align 32,
<800 x float>* byval nocapture readonly align 32) #0 {
entry:
  %x = load <800 x float>* %0, align 32
  %y = load <800 x float>* %1, align 32
  %add = fadd <800 x float> %x, %y
  ret <800 x float> %add
}

attributes #0 = { nounwind optsize readonly ssp uwtable
"less-precise-fpmad"="false" "no-frame-pointer-elim"="false"
"no-infs-fp-math"="false" "no-nans-fp-math"="false"
"stack-protector-buffer-size"="8" "unsafe-fp-math"="false"
"use-soft-float"="false" }

$ ./clang -Os -S -fomit-frame-pointer vecadd.c -o -
    .section    __TEXT,__text,regular,pure_instructions
    .globl    _foo
_foo:                                   ## @foo
    .cfi_startproc
## BB#0:                                ## %entry
    pushq    %rbp
Ltmp2:
    .cfi_def_cfa_offset 16
Ltmp3:
    .cfi_offset %rbp, -16
    movq    %rsp, %rbp
Ltmp4:
    .cfi_def_cfa_register %rbp
    andq    $-32, %rsp
    subq    $32, %rsp
    movaps    3200(%rbp), %xmm0
    movaps    3184(%rbp), %xmm1
    movaps    3152(%rbp), %xmm2
    addps    7248(%rbp), %xmm2
    addps    7280(%rbp), %xmm1
    addps    7296(%rbp), %xmm0
    movaps    16(%rbp), %xmm8
    movaps    32(%rbp), %xmm9
    movaps    48(%rbp), %xmm5
    movaps    64(%rbp), %xmm6
    movaps    3072(%rbp), %xmm7
    movaps    3136(%rbp), %xmm3
    addps    7232(%rbp), %xmm3
    addps    7168(%rbp), %xmm7
    addps    4160(%rbp), %xmm6
    movaps    3088(%rbp), %xmm4
    addps    7184(%rbp), %xmm4
    movaps    %xmm0, 3184(%rdi)
...

(and so on - no loop for an 800 element vector)

This is with:
$ ./clang -v
clang version 3.4 (trunk 191675) (llvm/trunk 191675:191681M)
Target: x86_64-apple-darwin11.4.2
Thread model: posix</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>