Skip to content

clang-21.1.0 regression: Cannot select: intrinsic %llvm.coro.noop #156820

@vogelsgesang

Description

@vogelsgesang

Clang 21.1.0 crashes with the message

fatal error: error in backend: Cannot select: intrinsic %llvm.coro.noop

when compiling

#include <coroutine>

void x() {
    std::noop_coroutine();
}

with clang 21 and the flags -std=c++23 -O0 -stdlib=libc++.

https://godbolt.org/z/Gnb6Mvoao

The same code compiles in clang 20.1.0.

Note that the code compiles fine as soon as the same file contains an actual coroutine. Probably we skip the %llvm.coro.noop-lowering pass if the translation unit does not contain any coroutine

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions