[llvm-bugs] [Bug 26574] New: Function replaceCongruentIVs can crash if incoming phi value is a global variable
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Feb 11 04:03:16 PST 2016
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: unassignedbugs at nondot.org
Reporter: mattias.v.eriksson at ericsson.com
CC: llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160211/83ea0825/attachment.html>
More information about the llvm-bugs
mailing list