[llvm-bugs] [Bug 32278] New: Assertion in DAGCombiner::visitCONCAT_VECTORS

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Mar 15 04:22:59 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=32278

            Bug ID: 32278
           Summary: Assertion in DAGCombiner::visitCONCAT_VECTORS
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Common Code Generator Code
          Assignee: unassignedbugs at nondot.org
          Reporter: zvi.rackover at intel.com
                CC: llvm-bugs at lists.llvm.org

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
> 0 && \"#Elements of a VectorType must be greater than 0\"", file=0x3d08af8
"/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

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170315/8ecd3f59/attachment.html>


More information about the llvm-bugs mailing list