<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=http://email.email.llvm.org/c/eJy1VVFvmzAQ_jXwYiUydkLggYem6aY9dN3SSt36Ehm4BE8GM9s0bX_9DtI0I0mbddMiKwe--z6dz99xqc4fE288_fgka49NclIbqI3OwFrIidWNycAbzzwWFc7V1uNnHvuAayVd0aTDTJf4otT91gwQ_AMyh69LqcCijWg8DqMIn3Tthlk2XD15LPbozKNnz_8hzZSoVh6b4hoEjAyuOBmUwpYen8nKgSIbLBlcYzBZyXuk7jNsVgvpdhZ3QZgZEA4WDspaG2EeFaZPDn4e48Qb0eOAjmsbWTe2aK1JH_oO26SdNRaLeE6CsO8u9T3Z4tBtcnnc_3OtDd6AMwRvBLkwtSmJuvIjyu6hHrSpbWvLkrYBnd3nbdoQ9PSYc9kxj7bU70Zy9rdILM37ka9CFIjnuss2YL9qvdhMKNXaxd3nibAOjBTxHJZgoMog4Bbc7t4_zdXFxfyaLq5uFjuN8PNuzTaLuEJashaWVNoRWSlZQf7KvYvNve_LRuT5W7Kpdf0im57DgDsq_t831wW2H8HNl64K_mNX9fODKk9NONo7DeqVnJJrZ7_eXs1n5MvNnLBRTwCvxG_Le6StOkF9u7x8YYxOKOqPsjxgHZ2iPTxaD3DQ29v46febi2OVYCfCx-GJ8IMjtC395hF2ouvLzc8Tnsc8Fr5oXKFNoopSNxb8xqjk3UNDWtt0U2PMY0b9ImERp4wGk9EkigPO4hhoxlORi2U0zuIUfCVSULadYR5jFaxJR4HPeBL_3zOQCaMMV4BjjI45GwaTnC7DjNJoEoQjTnF0QCmkGrY8Q21WPpagpUyblUWnktbZnVNYK1cVQJcwZuikU5Cct-OPLJHGEqefvyY4fksgy6bKnNSV9bvMki6tX1DnI34>53920</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Clang fails to inline some functions
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
lhmouse
</td>
</tr>
</table>
<pre>
[Gzip'd preprocessed source](https://github.com/llvm/llvm-project/files/8095688/opt.cc.gz)
`clang++-12 -O3 -masm=intel opt.cc -S` gives
```asm
_Z16create_temporaryl: # @_Z16create_temporaryl
push rbx
sub rsp, 16
mov rbx, rdi
mov qword ptr [rsp + 8], rsi
xorps xmm0, xmm0
movups xmmword ptr [rdi + 48], xmm0
movups xmmword ptr [rdi + 32], xmm0
movups xmmword ptr [rdi + 16], xmm0
movups xmmword ptr [rdi], xmm0
lea rsi, [rsp + 8]
call _ZN7asteria9Reference13set_temporaryIRlEERS0_OT_ # <<=== this was not inlined
mov rax, rbx
add rsp, 16
pop rbx
ret
```
while `g++-11 -O3 -masm=intel opt.cc -S` gives
```asm
_Z16create_temporaryl:
endbr64
pxor xmm0, xmm0
mov QWORD PTR 24[rdi], 0
mov rax, rdi
movups XMMWORD PTR 8[rdi], xmm0
pxor xmm0, xmm0
movups XMMWORD PTR 48[rdi], xmm0
mov QWORD PTR [rdi], rsi
mov BYTE PTR 24[rdi], 2
mov BYTE PTR 56[rdi], 2
movups XMMWORD PTR 32[rdi], xmm0
ret
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy1VU1v2zAM_TX2RUggyx-xDz40TTfs0HVLA2zrJZBlJdYgW54kN21__WilaeYkbdYBC4jQNvmeSYo0C1U-5l48_fgkWo9MStRq3mrFuDG8REZ1mnEvnnkkraxtjRdeeOQDyFrYqivGTNVwI-X9To0A_JMzC7crIbkBneIsTtIUrlRrx4yN108eyTw88_DF83-CmaTN2iNTkFFA0OgmRKOamtoLZ6KxXKItFo1uwRmtxT1QDxm20kPck-VdkDDNqeVLy-tWaaofJYSPjn4eCZEX4dMAx7XzbDtT9VoXD0OD6QqntYEiXqIgGZprdY92ODDrUpy2_9ooDSdgNYITAS4IbYpSV35AmQPUg9Kt6XVd497B6UPerncBy4C5FI452lG_GxmSf0VCad6PfBUiOX2uu-gdDqs28GVUyl4v7z5PqLFcC5rN-Ypr3jAehIbb_bl_msurq_ktXt4slvseCS-dzLaCbCUM2lCDGmWRaKRoePnKudPtuR-2DS3Lt9qmVe1L2wwMmtuTzf_nw00F44fg4ctUBf9xqobx8aYsdBIdZAP9is61q9Nfv93MZ-jLYo5INGiAV_x35T0xVq6hvl9fvzCmZzrqr6I8Yo3O0R6nNgAczfbOf_pjcXWqEuSMe5yccT9KoR_pN1PYN92w3fwyD8sszKhvhZU8v-y_5GhFhTTIqufBgE1Sc7TqGmaFaozfaZm_e6EIYzq3UeIwI9ivckbSrJhEOIuSSZQkMcNJGSYBj9OQxGHCfEkLLk2_3zxCGr5BjgKuIUtf5AQTkAAWFI5DMg4mJV4lDON0EiRRiGEp8BryGPdxjJVe-zp3IRXd2oBRCmPN3kiNEeuGc_c64KedrRQgqlp1hvvu1bkL_Tfv_g1Z">