[llvm-bugs] [Bug 33176] New: error in backend: Cannot select: intrinsic %llvm.coro.size when using clang coroutines support

via llvm-bugs llvm-bugs at lists.llvm.org
Thu May 25 15:35:21 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=33176

            Bug ID: 33176
           Summary: error in backend: Cannot select: intrinsic
                    %llvm.coro.size when using clang coroutines support
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Common Code Generator Code
          Assignee: unassignedbugs at nondot.org
          Reporter: richard-llvm at metafoo.co.uk
                CC: llvm-bugs at lists.llvm.org

Created attachment 18514
  --> https://bugs.llvm.org/attachment.cgi?id=18514&action=edit
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

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170525/d9ac985f/attachment-0001.html>


More information about the llvm-bugs mailing list