[llvm] [SCCP] Do not track returns from pre-split coroutines (PR #227232)

Weibo He via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 30 04:52:47 PDT 2026


NewSigma wrote:

We do return values after `coro.end` in the switched-resume ABI, and `unreachable` after `coro.end` is incorrect per our intrinsics document. If the return value in the returned-continuation ABI is not available before `coro-split`, one option is to declare a return-value alloca and escape it via `@llvm.coro.id.retcon`. The return value is then loaded from that alloca after `coro.end`, and `coro-split` can rewrite the load to use the concrete return value.

https://github.com/llvm/llvm-project/pull/227232


More information about the llvm-commits mailing list