[llvm] [CoroEarly][IR] Clarify semantic of llvm.coro.end (PR #191752)

Weibo He via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 13 02:21:15 PDT 2026


NewSigma wrote:

> > > How does this relate to #151067 ?
> > 
> > 
> > Since `llvm.coro.id` may capture the pointer to promise, I believe DSE must assume that `llvm.coro.id` could store that pointer into a global variable, and that `coro.end` might subsequently read from it. Currently, neither `coro.end` nor its parameters have any memory attributes defined.
> 
> My question is, what's the relationship with #151067?

Sorry for not making this clear earlier. Before #151067, nothing could prevent DSE from erasing the store. However, after #151067, llvm.coro.end post-dominates the GRO conversion and acts as an optimization fence.

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


More information about the llvm-commits mailing list