https://llvm.org/bugs/show_bug.cgi?id=26574
Bug ID: 26574 Summary: Function replaceCongruentIVs can crash if incoming phi value is a global variable Product: libraries Version: trunk Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: Scalar Optimizations Assignee: unassignedb...@nondot.org Reporter: mattias.v.eriks...@ericsson.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified Created attachment 15882 --> https://llvm.org/bugs/attachment.cgi?id=15882&action=edit Reduced input file with crash in indvars I found this crash in one of our internal test suites and reduced it to the attached repr.ll. opt -S -indvars repr.ll crashes like this: opt: ../include/llvm/Support/Casting.h:237: typename cast_retty<X, Y *>::ret_type llvm::cast(Y *) [X = llvm::Instruction, Y = llvm::Value]: Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed. Called from this line in ScalarEvolutionExpander.cpp: Instruction *OrigInc = cast<Instruction>(OrigPhiRef->getIncomingValueForBlock(LatchBlock)); (gdb) p OrigPhiRef->dump() %_tmp19 = phi i16** [ @pglob, %bb_lslct36 ], [ %_tmp196, %bb2 ] pglob is a "external global i16*" here. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs