<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 - Assertion in DAGCombiner::visitCONCAT_VECTORS"
   href="https://bugs.llvm.org/show_bug.cgi?id=32278">32278</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion in DAGCombiner::visitCONCAT_VECTORS
          </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>Windows NT
          </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>Common Code Generator Code
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>zvi.rackover@intel.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Running llc on the following function (reproduces both on X86 and ARM):

 define i8 @foo_v4i1_0_0_1_1_2_2_3_3(i8 %in) {
   %trunc = trunc i8 %in to i4                                                 
                                                                               
                                                                               
%mask = bitcast i4 %trunc to <4 x i1>
   %s = shufflevector <4 x i1> %mask, <4 x i1> undef, <8 x i32> <i32 0, i32 0,
i32 1, i32 1, i32 2, i32 2, i32 3, i32 3>                                      
                                                                               
 %b = bitcast <8 x i1> %s to i8
   ret i8 %b
 }

results in the following:
llc: llvm/lib/IR/Type.cpp:632: static llvm::VectorType
*llvm::VectorType::get(llvm::Type *, unsigned int): Assertion `NumElements > 0
&& "#Elements of a VectorType must be greater than 0"' failed.

Stack trace shows the assertion happened in DAGCombiner::visitCONCAT_VECTORS

#3  0x00007ffff67bf612 in __GI___assert_fail (assertion=0x3d09118 "NumElements
<span class="quote">> 0 && \"#Elements of a VectorType must be greater than 0\"", file=0x3d08af8</span >
"/users/zrackove/llvm/lib/IR/Type.cpp", line=632,
    function=0x3d0915e "static llvm::VectorType
*llvm::VectorType::get(llvm::Type *, unsigned int)") at assert.c:101
#4  0x00000000024518dd in llvm::VectorType::get (ElementType=0x4f18b38,
NumElements=0) at /users/zrackove/llvm/lib/IR/Type.cpp:632
#5  0x0000000002464ddd in llvm::EVT::getExtendedVectorVT (Context=..., VT=...,
NumElements=0) at /users/zrackove/llvm/lib/IR/ValueTypes.cpp:43
#6  0x0000000000a3552c in llvm::EVT::getVectorVT (Context=..., VT=...,
NumElements=0) at ../include/llvm/CodeGen/ValueTypes.h:74
#7  0x0000000002821c71 in (anonymous
namespace)::DAGCombiner::visitCONCAT_VECTORS (this=0x7fffffffb628, N=0x4fd28a0)
at /users/zrackove/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:14080
#8  0x00000000027e2614 in (anonymous namespace)::DAGCombiner::visit
(this=0x7fffffffb628, N=0x4fd28a0) at
/users/zrackove/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1477
#9  0x00000000027e199b in (anonymous namespace)::DAGCombiner::combine
(this=0x7fffffffb628, N=0x4fd28a0) at
/users/zrackove/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1493
#10 0x00000000027e0f47 in (anonymous namespace)::DAGCombiner::Run
(this=0x7fffffffb628, AtLevel=llvm::BeforeLegalizeTypes) at
/users/zrackove/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1345
#11 0x00000000027e0872 in llvm::SelectionDAG::Combine (this=0x4f51410,
Level=llvm::BeforeLegalizeTypes, AA=..., OptLevel=llvm::CodeGenOpt::Default) at
/users/zrackove/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:16317
#12 0x00000000029ab9ec in llvm::SelectionDAGISel::CodeGenAndEmitDAG
(this=0x4f50f10) at
/users/zrackove/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:807
#13 0x00000000029ab3ef in llvm::SelectionDAGISel::SelectBasicBlock
(this=0x4f50f10, Begin=..., End=..., HadTailCall=@0x7fffffffc55d: false) at
/users/zrackove/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:727
#14 0x00000000029ab114 in llvm::SelectionDAGISel::SelectAllBasicBlocks
(this=0x4f50f10, Fn=...) at
/users/zrackove/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1689
#15 0x00000000029a8dc9 in llvm::SelectionDAGISel::runOnMachineFunction
(this=0x4f50f10, mf=...) at
/users/zrackove/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:542
#16 0x0000000001853abb in (anonymous
namespace)::X86DAGToDAGISel::runOnMachineFunction (this=0x4f50f10, MF=...) at
/users/zrackove/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:176</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>