<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 --- - clang accepts implicit conversion between vector types"
   href="https://llvm.org/bugs/show_bug.cgi?id=25557">25557</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang accepts implicit conversion between vector types
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>philip.pfaffe@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>Clang silently accepts implicit conversions between vector types.

Minimal example:

// clang++ -std=c++11 -mavx2
#include <cstdint>
#include <immintrin.h>

int main() {
  uint8_t C[8] = {1,2,3,4,5,6,7,8};

  __m256i V = _mm256_loadu_si256((__m256i*)C);
  __m256i Two =  _mm256_set1_epi32(2);
  __m256 R = _mm256_div_ps(V, Two);
}

V and Two are here implicitly converted from __m256i to __m256. Both are
typedefs of float and longlong vectors, respectively. 
I think clang should at least throw a warning here (which is what icc does) or,
even better, an error (the gcc behaviour).</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>