[PATCH] D39356: [ThinLTO] Fix missing call graph edges for calls with bitcasts.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 10 17:36:24 PST 2017


efriedma added inline comments.


================
Comment at: llvm/trunk/lib/Analysis/ModuleSummaryAnalysis.cpp:284
+        assert(CalledValue && !isa<Constant>(CalledValue) &&
+               "Expected indirect call");
 
----------------
vsapsai wrote:
> efriedma wrote:
> > The following testcase triggers this assertion:
> > 
> > ```
> > define void @caller() {
> >     tail call void select (i1 icmp eq (i32* @a, i32* null), void ()* @f, void ()* @g)()
> >     ret void
> > }
> > declare void @f()
> > declare void @g()
> > @a = extern_weak global i32
> > ```
> Good catch, Eli. In this case CalledValue is not NULL but it is SelectConstantExpr as far as I can tell.
> 
> @tejohnson, do you think it's better to return previous skipping code or to handle this case in some special way?
> 
> @efriedma, is it based on existing test case or just on your LLVM knowledge? Asking to decide where to put this test. If it is a variation of another test, I would prefer to keep them together.
There are a few other regression tests with this IR construct, but not in any directory related to ThinLTO.


Repository:
  rL LLVM

https://reviews.llvm.org/D39356





More information about the llvm-commits mailing list