<html>
    <head>
      <base href="https://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 --- - vectorization remark is printed multiple times"
   href="https://llvm.org/bugs/show_bug.cgi?id=27618">27618</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>vectorization remark is printed multiple times
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.8
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Linux
          </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>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>albertnetymk@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>```
#define SIZE (1 << 15)

#define MINDEX(n, m) (SIZE*(n)+(m))

#define XMM_ALIGNMENT_BYTES 16

float *restrict mat_a __attribute__((aligned (XMM_ALIGNMENT_BYTES)));
float *restrict vec_b __attribute__((aligned (XMM_ALIGNMENT_BYTES)));
float *restrict vec_c __attribute__((aligned (XMM_ALIGNMENT_BYTES)));

// __attribute__ ((noinline))
void matvec_autovec()
{
    int i, j;

    float tmp;
    for (i = 0; i < SIZE; i++) {
        tmp = 0;
        for (j = 0; j < SIZE; j++) {
            tmp += mat_a[MINDEX(i, j)] * vec_b[j];
        }
        vec_c[i] = tmp;
    }
}

void multiple()
{
    matvec_autovec();
}

int main(int argc, char **argv)
{
    return 0;
}
```
The command I used is `clang-3.8 -Ofast test.c  -Rpass=loop-vectorize`

```
test.c:22:9: remark: vectorized loop (vectorization width: 4, interleaved
count: 1) [-Rpass=loop-vectorize]
        for (j = 0; j < SIZE; j++) {
        ^
test.c:22:9: remark: vectorized loop (vectorization width: 4, interleaved
count: 1) [-Rpass=loop-vectorize]
```

The output reduces to 1 after I uncomment the `noinline` attribute.</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>