<div dir="auto">Oh well. Add a comment then? :)</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 28, 2020, 3:59 PM Craig Topper via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">craig.topper marked an inline comment as done.<br>
craig.topper added inline comments.<br>
<br>
<br>
================<br>
Comment at: llvm/lib/Target/X86/X86Subtarget.cpp:91<br>
       case CodeModel::Medium:<br>
-        if (isa<Function>(GV))<br>
+        if (isa_and_nonnull<Function>(GV))<br>
           return X86II::MO_NO_FLAG; // All code is RIP-relative<br>
----------------<br>
echristo wrote:<br>
> Seems reasonable to either comment your commit message here or try to fix the nullptr into classifyLocalReference and assert nonnull?<br>
Looks like there are several places that handle constants to that pass null, fastisel, globalisel and regular isel. Also jump tables.<br>
<br>
This function takes a GlobalValue and constants and jump table don't exist as GlobalValues do they? So I'm not sure how to fix the nullptr input.<br>
<br>
<br>
CHANGES SINCE LAST ACTION<br>
  <a href="https://reviews.llvm.org/D80763/new/" rel="noreferrer noreferrer" target="_blank">https://reviews.llvm.org/D80763/new/</a><br>
<br>
<a href="https://reviews.llvm.org/D80763" rel="noreferrer noreferrer" target="_blank">https://reviews.llvm.org/D80763</a><br>
<br>
<br>
<br>
</blockquote></div>