[llvm-bugs] [Bug 35469] New: [InlineCost] CallAnalyzer crashes when analyzing bitcasted callee
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Nov 29 12:24:19 PST 2017
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: unassignedbugs at nondot.org
Reporter: kavon.farvardin at gmail.com
CC: llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20171129/49875763/attachment.html>
More information about the llvm-bugs
mailing list