<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/64933>64933</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            clang optimization issue in coroutines(not allocations)
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          kelbon
      </td>
    </tr>
</table>

<pre>
    https://godbolt.org/z/5hTE69j1b

starting row 82 in asm there are something strange in 'trunk', im 99% sure someone apply 'cold' attribute or 'never inline' to all functions in final suspend or smth like.

All calls must be inlined, its literaly one-row functions.

```asm
g1() [clone .resume]:                          # @g1() [clone .resume]
        push    rbx
        sub     rsp, 16
 cmp     byte ptr [rdi + 44], 0
        je      .LBB8_1
        lea rbx, [rdi + 16]
        mov     qword ptr [rdi], 0
        call std::__n4861::coroutine_handle<dd::generator_promise<int> >::from_address(void*)
        mov     qword ptr [rsp + 8], rax
 lea     rdi, [rsp + 8]
        call std::__n4861::coroutine_handle<dd::generator_promise<int> >::operator std::__n4861::coroutine_handle<void>() const
        mov     rdi, rbx
 mov     rsi, rax
        call dd::generator_promise<int>::await_suspend(std::__n4861::coroutine_handle<void>) const
        mov     qword ptr [rsp], rax
        mov     rdi, rsp
 call    std::__n4861::coroutine_handle<void>::address() const
 mov     rdi, rax
        add     rsp, 16
        pop     rbx
 jmp     qword ptr [rax]                 # TAILCALL
.LBB8_1:
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy8Vc1u47oOfhpmIzSwJduxF16kaQNcoMvZB7LFxGplyVeU2-k8_YFsp00ynTkzmxMEISL-fR8pipJInyxiDfk95A8rOYbO-foFTePsqnHqve5CGAjEFvge-P7kVONMWDt_Ar7_AXyfd98ei-o5bSB5gGQ7_1KQPmh7Yt69sZIzbZmknoUOPTLpkZHrMXTRgoKX9oTRBPgm-NG-AN8A3z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