<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 - Clang++ crash on AVX code"
   href="https://bugs.llvm.org/show_bug.cgi?id=46441">46441</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Clang++ crash on AVX code
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>8.0
          </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>enhancement
          </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>matthijs@fb.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=23644" name="attach_23644" title="source file + 2 files generated by clang">attachment 23644</a> <a href="attachment.cgi?id=23644&action=edit" title="source file + 2 files generated by clang">[details]</a></span>
source file + 2 files generated by clang

clang++ version 8.0.20181009 crashes when compiling 

clang++ -mavx2 -O3  -g -std=c++11 matmul_18.cpp


The error output is 

fatal error: error in backend: Cannot select: 0x9ac1248: v16i16 =
X86ISD::VBROADCAST 0x9a8e460
  0x9a8e460: v4i16 = bitcast 0x9ac0958
    0x9ac0958: v4i64 = insert_subvector 0x9a88718, 0x9a88238, Constant:i64<2>
      0x9a88718: v4i64 = insert_subvector undef:v4i64, 0x9a88238,
Constant:i64<0>
        0x9ac0dd0: v4i64 = undef
        0x9a88238: v2i64 = bitcast 0x9abd3e0, matmul_18.cpp:117:33 @[
matmul_18.cpp:159:22 ]
          0x9abd3e0: v8i16 = X86ISD::VBROADCAST 0x9a88bf8, matmul_18.cpp:117:33
@[ matmul_18.cpp:159:22 ]
            0x9a88bf8: i16,ch = load<(load 2 from %ir.56, !tbaa !888)>
0x9946718, 0x9a88098, undef:i64, matmul_18.cpp:116:20 @[ matmul_18.cpp:159:22 ]
              0x9a88098: i64 = add nuw 0x9ac27d8, Constant:i64<16>,
matmul_18.cpp:116:35 @[ matmul_18.cpp:159:22 ]
                0x9ac27d8: i64 = add 0x9ac29e0, 0x9a88e68, matmul_18.cpp:159:37
                  0x9ac29e0: i64,ch = CopyFromReg 0x9946718, Register:i64 %32,
matmul_18.cpp:159:37

                  0x9a88e68: i64 = and 0x9ac4860, Constant:i64<4294967288>,
matmul_18.cpp:159:37


                0x9a885e0: i64 = Constant<16>
              0x9ac0f70: i64 = undef
        0x9abdc00: i64 = Constant<0>
      0x9a88238: v2i64 = bitcast 0x9abd3e0, matmul_18.cpp:117:33 @[
matmul_18.cpp:159:22 ]
        0x9abd3e0: v8i16 = X86ISD::VBROADCAST 0x9a88bf8, matmul_18.cpp:117:33
@[ matmul_18.cpp:159:22 ]
          0x9a88bf8: i16,ch = load<(load 2 from %ir.56, !tbaa !888)> 0x9946718,
0x9a88098, undef:i64, matmul_18.cpp:116:20 @[ matmul_18.cpp:159:22 ]
            0x9a88098: i64 = add nuw 0x9ac27d8, Constant:i64<16>,
matmul_18.cpp:116:35 @[ matmul_18.cpp:159:22 ]
              0x9ac27d8: i64 = add 0x9ac29e0, 0x9a88e68, matmul_18.cpp:159:37
                0x9ac29e0: i64,ch = CopyFromReg 0x9946718, Register:i64 %32,
matmul_18.cpp:159:37
                  0x9ac4c70: i64 = Register %32
                0x9a88e68: i64 = and 0x9ac4860, Constant:i64<4294967288>,
matmul_18.cpp:159:37
                  0x9ac4860: i64 = any_extend 0x9abe280, matmul_18.cpp:159:41

                  0x9ac0a90: i64 = Constant<4294967288>
              0x9a885e0: i64 = Constant<16>
            0x9ac0f70: i64 = undef
      0x9abdda0: i64 = Constant<2>
In function: _Z13matmul_CF_k18iiiPKaPKhPs
clang-8: error: clang frontend command failed with exit code 70 (use -v to see
invocation)
clang version 8.0.20181009 
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir:
/mnt/gvfs/third-party2/llvm-fb/52d450f21335df7a47d47f03d638e7ecbee6266f/20181009/platform007/9e92d53/bin
clang-8: note: diagnostic msg: PLEASE submit a bug report to
<a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash backtrace, preprocessed source,
and associated run script.
clang-8: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-8: note: diagnostic msg: /tmp/matmul_18-89d550.cpp
clang-8: note: diagnostic msg: /tmp/matmul_18-89d550.sh
clang-8: note: diagnostic msg: 

********************</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>