<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 10, 2017 at 5:19 PM, Volodymyr Sapsai via Phabricator <span dir="ltr"><<a href="mailto:reviews@reviews.llvm.org" target="_blank">reviews@reviews.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">vsapsai added inline comments.<br>
<span class=""><br>
<br>
================<br>
Comment at: llvm/trunk/lib/Analysis/<wbr>ModuleSummaryAnalysis.cpp:284<br>
+        assert(CalledValue && !isa<Constant>(CalledValue) &&<br>
+               "Expected indirect call");<br>
<br>
----------------<br>
</span><span class="">efriedma wrote:<br>
> The following testcase triggers this assertion:<br>
><br>
> ```<br>
> define void @caller() {<br>
>     tail call void select (i1 icmp eq (i32* @a, i32* null), void ()* @f, void ()* @g)()<br>
>     ret void<br>
> }<br>
> declare void @f()<br>
> declare void @g()<br>
> @a = extern_weak global i32<br>
> ```<br>
</span>Good catch, Eli. In this case CalledValue is not NULL but it is SelectConstantExpr as far as I can tell.<br>
<br>
@tejohnson, do you think it's better to return previous skipping code or to handle this case in some special way?<br></blockquote><div><br></div><div>I suspect we should just put the old continue back in, since we have now confirmed we're getting reference edges for these cases. I was more concerned about having the assert in when I thought we weren't getting any edge.</div><div><br></div><div>Thanks,</div><div>Teresa</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
@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.<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
Repository:<br>
  rL LLVM<br>
<br>
<a href="https://reviews.llvm.org/D39356" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D39356</a><br>
<br>
<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><span style="font-family:Times;font-size:medium"><table cellspacing="0" cellpadding="0"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small"><td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Teresa Johnson |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Software Engineer |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:tejohnson@google.com" target="_blank">tejohnson@google.com</a> |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"> 408-460-2413</td></tr></tbody></table></span></div>
</div></div>