<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - Unsupported vector mode is passed incorrectly"
   href="https://bugs.llvm.org/show_bug.cgi?id=39501">39501</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Unsupported vector mode is passed incorrectly
          </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>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>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>hjl.tools@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>[hjl@gnu-cfl-1 tmp]$ cat x.c
typedef int __attribute__((mode(QI))) qi;
typedef qi __attribute__((vector_size (32))) v32qi;

v32qi foo (int x)
{
 v32qi y = {'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f',
         '0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'};
 return y;
}
[hjl@gnu-cfl-1 tmp]$ clang -mno-avx -S -O2 x.c


        movaps  .LCPI0_0(%rip), %xmm0   # xmm0 =
[48,49,50,51,52,53,54,55,56,57,97,98,99,100,101,102]
        movaps  %xmm0, %xmm1
        retq

-mno-avx should pass v32qi as before AVX was enabled.  For example,

[hjl@gnu-cfl-1 tmp]$ cat z.c
typedef int __attribute__((mode(SI))) si;
typedef si __attribute__((vector_size (128))) v;

v
foo (int x)
{
 v y = {'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f',
         '0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'};
 return y;
}
[hjl@gnu-cfl-1 tmp]$ clang -S -O2 z.c
...
        movaps  .LCPI0_0(%rip), %xmm0   # xmm0 = [99,100,101,102]
        movaps  %xmm0, 112(%rdi)
        movaps  .LCPI0_1(%rip), %xmm1   # xmm1 = [56,57,97,98]
        movaps  %xmm1, 96(%rdi)
        movaps  .LCPI0_2(%rip), %xmm2   # xmm2 = [52,53,54,55]
        movaps  %xmm2, 80(%rdi)
        movaps  .LCPI0_3(%rip), %xmm3   # xmm3 = [48,49,50,51]
        movaps  %xmm3, 64(%rdi)
        movaps  %xmm0, 48(%rdi)
        movaps  %xmm1, 32(%rdi)
        movaps  %xmm2, 16(%rdi)
        movaps  %xmm3, (%rdi)
        movq    %rdi, %rax
        retq

If there were AVX1024, clang would have passed y in vector register. When
AVX1024 were disabled, clang would have passed y in memory and issued an
ABI change warning.</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>