MatzeB wrote: For the record: I believe there is no additional problems with coroutines (functions changing thread-id) with this optimization given `GlobalOpt` computes summaries for the whole module independent of control flow anyway. https://github.com/llvm/llvm-project/pull/88454