<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - GlobalISel: Instruction selection failed"
   href="https://llvm.org/bugs/show_bug.cgi?id=31669">31669</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>GlobalISel: Instruction selection failed
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>vleschuk@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=17847" name="attach_17847" title="Reproduction script and source">attachment 17847</a> <a href="attachment.cgi?id=17847&action=edit" title="Reproduction script and source">[details]</a></span>
Reproduction script and source

When trying to compile simple source (see attached) with GlobalISel enabled it
generates the following error:

fatal error: error in backend: Instruction selection failed

And doesn't fallback to usage of old ISel.

The problematic code:

struct S {
  void f() {}
};
S s;
int main() {
  s.f();
  return 0;
}

This happens once you introduce call of object's non-static method: if you
change f() to static or make it just a global function, error is not
reproduced.

LLVM was build from master: 62b3258a7c27b81ccc83d0e19fa2baf295ec460e,
git-svn-id: <a href="https://llvm.org/svn/llvm-project/llvm/trunk@292205">https://llvm.org/svn/llvm-project/llvm/trunk@292205</a></pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>