Bugzilla – Bug 284
[indvars] Induction variable analysis violates LLVM invariants
Last modified: 2004-03-10 15:45:15
You need to log in before you can comment on or make changes to this bug.
Running opt -indvars on the attached LLVM code (once compiled to assembly) aborts with the following message: PHI nodes not grouped at top of basic block! %doinner.1.i = phi int [ 0, %then.3.i ], [ 0, %endif.0.i ] ; <int> [#uses=0] label %endif.3.i Broken module found, compilation aborted! opt[0x85bc2c2] opt[0x85bc4e2] opt[0x42029188] opt(abort+0x16e)[0x4202a8c2] opt((anonymous namespace)::Verifier::abortIfBroken() const+0x31)[0x85b1eef] opt((anonymous namespace)::Verifier::runOnFunction(llvm::Function&)+0x4a)[0x85b1282] opt(llvm::PassManagerTraits<llvm::Function>::runPass(llvm::FunctionPass*, llvm::Function*)+0x1f)[0x8595577] opt(llvm::PassManagerT<llvm::Function>::runOnUnit(llvm::Function*)+0x5c9)[0x858b9af] opt(llvm::PassManagerTraits<llvm::Function>::runOnFunction(llvm::Function&)+0x1f)[0x858c589] opt(llvm::FunctionPass::run(llvm::Module&)+0xa7)[0x854aa2b] opt(llvm::PassManagerTraits<llvm::Module>::runPass(llvm::Pass*, llvm::Module*)+0x1f)[0x859560d] opt(llvm::PassManagerT<llvm::Module>::runOnUnit(llvm::Module*)+0x5c9)[0x8589b21] opt(llvm::PassManagerTraits<llvm::Module>::run(llvm::Module&)+0x1f)[0x858b1c9] opt(llvm::PassManager::run(llvm::Module&)+0x23)[0x8549eef] opt(main+0x7c9)[0x8377da9] opt(__libc_start_main+0x95)[0x42017589] opt(dlopen+0x41)[0x8377531] Abort (core dumped)
Created an attachment (id=96) [details] LLVM assembly code that reproduces the problem This was reduced by bugpoint from mi_arc.c from the GNU plotutils.
Fixed. Patch here: http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20040308/012948.html Testcase here: http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20040308/012947.html Thanks for finding this John! -Chris