<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 --- - SDAG failure on AVX512BW/AVX512VL"
   href="https://llvm.org/bugs/show_bug.cgi?id=25684">25684</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>SDAG failure on AVX512BW/AVX512VL
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </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>Backend: X86
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>congh@google.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>LLVM fails to select instructions for the following IR on AVX512BW/AVX512VL (OK
on other AVX512 sets):

define void @truncate_v16i16_to_v16i8(<16 x i16> %a) {
  %1 = trunc <16 x i16> %a to <16 x i8>
  store <16 x i8> %1, <16 x i8>* undef, align 4
  ret void
}



The error message on AVX512BW:


    .section    __TEXT,__text,regular,pure_instructions
LLVM ERROR: Cannot select: t9: ch = store<ST16[undef](align=4), trunc to v16i8>
t0, t2, undef:i64, undef:i64
  t2: v16i16,ch = CopyFromReg t0, Register:v16i16 %vreg0
    t1: v16i16 = Register %vreg0
  t4: i64 = undef
  t4: i64 = undef
In function: truncate_v16i16_to_v16i8



The error message on AVX512VL:


    .section    __TEXT,__text,regular,pure_instructions
LLVM ERROR: Cannot select: t6: ch = store<ST16[undef](align=4)> t0, t10,
undef:i64, undef:i64
  t10: v16i8 = X86ISD::VTRUNC t9
    t9: v16i32 = X86ISD::VSEXT t2
      t2: v16i16,ch = CopyFromReg t0, Register:v16i16 %vreg0
        t1: v16i16 = Register %vreg0
  t4: i64 = undef
  t4: i64 = undef
In function: truncate_v16i16_to_v16i8</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>