https://bugs.llvm.org/show_bug.cgi?id=35469
Bug ID: 35469
Summary: [InlineCost] CallAnalyzer crashes when analyzing
bitcasted callee
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Interprocedural Analyses
Assignee: unassignedb...@nondot.org
Reporter: kavon.farvar...@gmail.com
CC: llvm-bugs@lists.llvm.org
Created attachment 19489
--> https://bugs.llvm.org/attachment.cgi?id=19489&action=edit
backtrace of infinite recursion crash
The following IR crashes LLVM when running -inline -early-cse. It is not
specific to early-cse, since other passes following inline also crash it, such
as instcombine, gvn, etc.
define void @func1() {
%t = bitcast void ()* @func2 to void ()*
tail call void %t()
ret void
}
define void @func2() {
%t = bitcast void ()* @func2 to void ()*
tail call void %t()
ret void
}
It appears to be the bitcast that is throwing off CallAnalyzer, and sends it
into an infinite loop. My best guess is that somewhere it assumes it is an
indirect call, but somewhere else it sees that the callee is known, and so it
recurses forever trying to analyze @func2. I have attached a backtrace to aid
in debugging.
--
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