The following test case produces this assertion failure: llc: /proj/llvm/build/../llvm/include/llvm/Target/TargetLowering.h:257: llvm::MVT::ValueType llvm::TargetLowering::getValueType(const llvm::Type*) const: Assertion `0 && "Unknown type!"' failed. ; ModuleID = 'bugpoint-reduced-simplified.bc' target endian = little target pointersize = 32 target triple = "i686-pc-linux-gnu" %struct_4 = type { int, long, sbyte* } implementation ; Functions: void %func_37(int, ...) { entry: store %struct_4 zeroinitializer, %struct_4* null unreachable }
Created attachment 361 [details] Bugpoint reduced test case
Here's the stack trace: #0 0x00849402 in __kernel_vsyscall () #1 0x0088f069 in raise () from /lib/libc.so.6 #2 0x00890671 in abort () from /lib/libc.so.6 #3 0x008889d9 in __assert_fail () from /lib/libc.so.6 #4 0x084521ec in llvm::TargetLowering::getValueType (this=0x9ebf308, Ty=0x9ec27a0) at /proj/llvm/build/../llvm/include/llvm/Target/TargetLowering.h:257 #5 0x086f9394 in llvm::SelectionDAGLowering::getValue (this=0xbfcb0c60, V=0x9ed3990) at /proj/llvm/build/../llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:576 #6 0x086feca5 in llvm::SelectionDAGLowering::visitStore (this=0xbfcb0c60, I=@0x9ed39d0) at /proj/llvm/build/../llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1381 #7 0x08737b72 in llvm::SelectionDAGLowering::visit (this=0xbfcb0c60, Opcode=25, I=@0x9ed39d0) at /proj/llvm/build/../llvm/include/llvm/Instruction.def:119 #8 0x08738ce5 in llvm::SelectionDAGLowering::visit (this=0xbfcb0c60, I=@0x9ed39d0) at /proj/llvm/build/../llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:440 #9 0x0870a0d6 in llvm::SelectionDAGISel::BuildSelectionDAG (this=0x9ebf2c0, DAG=@0xbfcb1320, LLVMBB=0x9ed3150, PHINodesToUpdate=@0xbfcb15c0, FuncInfo=@0xbfcb1600) at /proj/llvm/build/../llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:3394 #10 0x0870abaf in llvm::SelectionDAGISel::SelectBasicBlock (this=0x9ebf2c0, LLVMBB=0x9ed3150, MF=@0x9ed0b40, FuncInfo=@0xbfcb1600) at /proj/llvm/build/../llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:3537 #11 0x08709314 in llvm::SelectionDAGISel::runOnFunction (this=0x9ebf2c0, Fn=@0x9ec67e0) at /proj/llvm/build/../llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:3268 #12 0x085b3f79 in (anonymous namespace)::X86DAGToDAGISel::runOnFunction (this=0x9ebf2c0, Fn=@0x9ec67e0) at /proj/llvm/build/../llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:105 #13 0x0890dc47 in llvm::FunctionPassManagerT::runPass (this=0x9ec5ec8, P=0x9ebf2c0, F=0x9ec67e0) at /proj/llvm/build/../llvm/lib/VMCore/PassManagerT.h:795 #14 0x0890c3dc in llvm::PassManagerT<llvm::FTraits>::runPasses (this=0x9ec5ee0, M=0x9ec67e0, LastUserOf=@0xbfcb17d0) at /proj/llvm/build/../llvm/lib/VMCore/PassManagerT.h:596 #15 0x0890c263 in llvm::PassManagerT<llvm::FTraits>::runOnUnit (this=0x9ec5ee0, M=0x9ec67e0) at /proj/llvm/build/../llvm/lib/VMCore/PassManagerT.h:282 #16 0x0890dce5 in llvm::FunctionPassManagerT::runOnFunction (this=0x9ec5ec8, F=@0x9ec67e0) at /proj/llvm/build/../llvm/lib/VMCore/PassManagerT.h:884 #17 0x088f951f in llvm::FunctionPass::runOnModule (this=0x9ec5ec8, M=@0x9ebc998) at /proj/llvm/build/../llvm/lib/VMCore/Pass.cpp:245 #18 0x0890f80d in llvm::ModulePassManager::runPass (this=0x9ec8ae0, P=0x9ec5ec8, M=0x9ebc998) at /proj/llvm/build/../llvm/lib/VMCore/PassManagerT.h:837 #19 0x0890e64a in llvm::PassManagerT<llvm::MTraits>::runPasses (this=0x9ec8af8, M=0x9ebc998, LastUserOf=@0xbfcb1950) at /proj/llvm/build/../llvm/lib/VMCore/PassManagerT.h:596 #20 0x0890e4d1 in llvm::PassManagerT<llvm::MTraits>::runOnUnit (this=0x9ec8af8, M=0x9ebc998) at /proj/llvm/build/../llvm/lib/VMCore/PassManagerT.h:282 #21 0x088f85e3 in llvm::ModulePassManager::runOnModule (this=0x9ec8ae0, M=@0x9ebc998) at /proj/llvm/build/../llvm/lib/VMCore/PassManagerT.h:905 #22 0x088f8967 in llvm::PassManager::run (this=0xbfcb1b50, M=@0x9ebc998) at /proj/llvm/build/../llvm/lib/VMCore/Pass.cpp:85 #23 0x084228f6 in main (argc=6, argv=0xbfcb1c34) at /proj/llvm/build/../llvm/tools/llc/llc.cpp:234
This looks to be a verifier bug in that invalid input was not caught before code gen started.
Fixed. Patch here: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20060710/035965.html Testcase here: Regression/Verifier/2006-07-11-StoreStruct.ll Thanks! -Chris