<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 - static llvm::FixedVectorType *llvm::FixedVectorType::get(llvm::Type *, unsigned int): Assertion `NumElts > 0 && "#Elements of a VectorType must be greater than 0"' failed."
   href="https://bugs.llvm.org/show_bug.cgi?id=50374">50374</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>static llvm::FixedVectorType *llvm::FixedVectorType::get(llvm::Type *, unsigned int): Assertion `NumElts > 0 && "#Elements of a VectorType must be greater than 0"' failed.
          </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>All
          </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>Backend: X86
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>benny.kra@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>craig.topper@gmail.com, llvm-bugs@lists.llvm.org, llvm-dev@redking.me.uk, pengfei.wang@intel.com, spatel+llvm@rotateright.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>$ cat reduce.ll
define fastcc void
@wide.body_computation__18.1604.clone.clone.clone.clone.clone.clone()
unnamed_addr {
while.84.body.preheader:
  %0 = load i8, i8* undef, align 1
  %1 = load i8, i8* undef, align 4
  %.not14.2.2 = icmp eq i8 0, 0
  %2 = and i8 %0, 1
  %.not14.1.2 = icmp eq i8 %2, 0
  %3 = select i1 %.not14.2.2, i1 %.not14.1.2, i1 false
  %.not14.2361 = icmp eq i8 0, 0
  %4 = select i1 %3, i1 %.not14.2361, i1 false
  %add.10961.i.2.2 = select reassoc nsz contract i1 %4, float 0.000000e+00,
float 0x7FF8000000000000
  %broadcast.splatinsert2024 = insertelement <8 x float> poison, float
%add.10961.i.2.2, i32 0
  %broadcast.splat2025 = shufflevector <8 x float> %broadcast.splatinsert2024,
<8 x float> poison, <8 x i32> zeroinitializer
  %broadcast.splatinsert2049 = insertelement <8 x i8> poison, i8 %1, i32 0
  %broadcast.splat2050 = shufflevector <8 x i8> %broadcast.splatinsert2049, <8
x i8> poison, <8 x i32> zeroinitializer
  br label %vector.body1999

vector.body1999:                                  ; preds = %vector.body1999,
%while.84.body.preheader
  %predphi2026 = select <8 x i1> undef, <8 x float> undef, <8 x float>
%broadcast.splat2025
  %predphi2051 = select <8 x i1> undef, <8 x i8> %broadcast.splat2050, <8 x i8>
undef
  br label %vector.body1999
}

$ llc < reduced.ll -mcpu=skx
llc: llvm/lib/IR/Type.cpp:645: static llvm::FixedVectorType
*llvm::FixedVectorType::get(llvm::Type *, unsigned int): Assertion `NumElts > 0
&& "#Elements of a VectorType must be greater than 0"' failed.
PLEASE submit a bug report to <a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash
backtrace.
Stack dump:
0.      Program arguments: llc -mcpu=skx
1.      Running pass 'Function Pass Manager' on module '<stdin>'.
2.      Running pass 'X86 DAG->DAG Instruction Selection' on function
'@wide.body_computation__18.1604.clone.clone.clone.clone.clone.clone'

The crashing code path was added in
<a href="https://github.com/llvm/llvm-project/commit/aa4afebbf90f1c0ec7853b95c108f9c363e226eb">https://github.com/llvm/llvm-project/commit/aa4afebbf90f1c0ec7853b95c108f9c363e226eb</a></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>