While working on emplementing some new feature in PyPy's LLVM backend (garbage collection framework) we encountered a blocker. I've ran bugpoint on it and it came with a rather small reduced case, which I have attached. The traceback I get is this:.... opt: Type.cpp:375: virtual const llvm::Type* llvm::StructType::getTypeAtIndex(const llvm::Value*) const: Assertion `indexValid(V) && "Invalid structure index!"' failed. /home/ericvrp/projects/llvm/Release/bin/opt((anonymous namespace)::PrintStackTrace()+0x1f)[0x83c7e0f]/lib/libc.so.6(abort+0xeb)[0xb7dc30f3] /lib/libc.so.6(__assert_fail+0xeb)[0xb7dbb4af] /home/ericvrp/projects/llvm/Release/bin/opt(llvm::StructType::getTypeAtIndex(llvm::Value const*) const+0x6a)[0x837b1fa] ./crash.sh: line 1: 21353 Aborted ~/projects/llvm/Release/bin/opt bugpoint-reduced- simplified.bc -instcombine
Created attachment 383 [details] bugpoint reduced bytecode run with: opt bugpoint-reduced-simplified.bc -instcombine
Fixed. Patch here: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20060911/037721.html Testcase here: Transforms/InstCombine/2006-09-11-EmptyStructCrash.ll -Chris
great job! very fast response! thank you