<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - error in backend: Cannot select: intrinsic %llvm.coro.size when using clang coroutines support"
   href="https://bugs.llvm.org/show_bug.cgi?id=33176">33176</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>error in backend: Cannot select: intrinsic %llvm.coro.size when using clang coroutines support
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

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

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

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Common Code Generator Code
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>richard-llvm@metafoo.co.uk
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=18514" name="attach_18514" title="complete testcase for coroutines isel failure">attachment 18514</a> <a href="attachment.cgi?id=18514&action=edit" title="complete testcase for coroutines isel failure">[details]</a></span>
complete testcase for coroutines isel failure

Testcase:

#include <coroutines>

using namespace std::experimental;
using namespace std;

template<typename T> struct generator {
  struct promise_type {
    suspend_always yield_value(T t);
    suspend_never initial_suspend();
    suspend_always final_suspend();
    void return_void();
    generator get_return_object();
    void unhandled_exception();
  };
};

template<typename T, typename... U>
struct coroutine_traits<generator<T>, U...> {
  using promise_type = typename generator<T>::promise_type;
};

generator<int> iota() { co_yield 0; }
int main() { iota(); }


(Full testcase attached)


Results in:

fatal error: error in backend: Cannot select: intrinsic %llvm.coro.size</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>