Assertion failed: (Ty && "Invalid GetElementPtrInst indices for type!"), function checkType, file /Users/ks/code/llvm/include/llvm/Instructions.h, line 279. 0 opt 0x0000000100429402 PrintStackTrace(void*) + 38 1 opt 0x000000010042985c SignalHandler(int) + 254 2 libSystem.B.dylib 0x00007fff8520635a _sigtramp + 26 3 opt 0x0000000100022ac9 llvm::APInt::~APInt() + 21 4 libSystem.B.dylib 0x00007fff852819b4 __pthread_markcancel + 0 5 opt 0x00000001001a2b36 llvm::checkType(llvm::Type const*) + 59 6 opt 0x00000001001ad423 llvm::GetElementPtrInst::GetElementPtrInst(llvm::Value*, llvm::Value**, llvm::Value**, unsigned int, llvm::Twine const&, llvm::Instruction*) + 135 7 opt 0x00000001000cfa30 llvm::GetElementPtrInst* llvm::GetElementPtrInst::Create(llvm::Value*, llvm::Value**, llvm::Value**, llvm::Twine const&, llvm::Instruction*) + 121 8 opt 0x00000001001a4d4d llvm::InstCombiner::visitGetElementPtrInst(llvm::GetElementPtrInst&) + 2099 9 opt 0x00000001001ad805 llvm::InstVisitor::visitGetElementPtr(llvm::GetElementPtrInst&) + 29 10 opt 0x00000001001adbc1 llvm::InstVisitor::visit(llvm::Instruction&) + 953 11 opt 0x00000001001a661c llvm::InstCombiner::DoOneIteration(llvm::Function&, unsigned int) + 2112 12 opt 0x00000001001a69be llvm::InstCombiner::runOnFunction(llvm::Function&) + 178 13 opt 0x00000001003bf51e llvm::FPPassManager::runOnFunction(llvm::Function&) + 348 14 opt 0x0000000100207f98 (anonymous namespace)::CGPassManager::RunPassOnSCC(llvm::Pass*, llvm::CallGraphSCC&, llvm::CallGraph&, bool&, bool&) + 576 15 opt 0x0000000100208276 (anonymous namespace)::CGPassManager::RunAllPassesOnSCC(llvm::CallGraphSCC&, llvm::CallGraph&, bool&) + 488 16 opt 0x0000000100208518 (anonymous namespace)::CGPassManager::runOnModule(llvm::Module&) + 352 17 opt 0x00000001003bf1f0 llvm::MPPassManager::runOnModule(llvm::Module&) + 384 18 opt 0x00000001003c0999 llvm::PassManagerImpl::run(llvm::Module&) + 111 19 opt 0x00000001003c09fb llvm::PassManager::run(llvm::Module&) + 33 20 opt 0x0000000100066f8b main + 3420 21 opt 0x000000010005ca1c start + 52 Stack dump: 0. Program arguments: opt -O1 b.ll 1. Running pass 'CallGraph Pass Manager' on module 'b.ll'. 2. Running pass 'Combine redundant instructions' on function '@clay_Shape' Abort trap