<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/98560>98560</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[MIPS] microMIPS and MIPS16 don't use jr instruction delay slot and instead always use the version with no delay slot
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
GabrielRavier
</td>
</tr>
</table>
<pre>
A function such as:
```cpp
#include <stdint.h>
uint8_t f(uint8_t x)
{
return x;
}
```
gets compiled by GCC to:
```x86asm
f(unsigned char):
jr $31
move $2,$4
```
on MIPS with either `-mmicromips` or `-mips16` in use, whereas in those cases LLVM emits:
```x86asm
f(unsigned char): # @f(unsigned char)
move $2, $4
jrc $ra
```
I've searched around and could not find anything contradicting the idea that using the version with a delay slot when the delay slot can be filled is faster.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMU01r4zAQ_TXyZWhw5K_44EObbEqhhWUX9rrI0jhWkaUgjZLm3y9yEpr9aFljrPEbPXnm-Y0IQe8sYseqB1ZtMhFpdL57FL3XaL6Jg0af9U6dunsYopWknYUQ5QgisOKe5RuWX591fr7lfn9BeKGtNFEhsGIdSGlLi5EVX25pUVta_SQYGF9d4zfG28ue5uEcAAB4pOgtvLHi4Zrd_PHt25N3SAGkm_baoIL-BI_rNZD7qOy3VS3CdAbnYuwsjQI5Cp8KuvLgcr3688p4WSx_T03ugJcUZ3zNeFl-Uqiz8PL09TscNY2Amkb0wOr8bpq09G7S-8DqHNwF1PuwrBOgLcSAjK_hOKJHERJCowsIUgQM8Pz84wVw0vThr_qPnoHxAliZ_zP9WdPw3vW7YjKhXnwixhPjzQEhoPByRAXCu2gVCKtAumgUWEcw6Bk60ajtDqSz5IXSktIbjQhaoQAaBUEMV-yAPiT3zioLUGjECYJxlOSz85YbTAoLPcKgTTKPDjCIQOgXmeoK1RatyLBbNjxviqppy2zsyqFZNhyHBnkji7YoKl7VbdmUbcX7QRWZ7njOy7xZLjnP26pcNErJVjZ5Ucu6krJhZY6T0GZhzGFaOL_LdAgRu3ZV1XlmRI8mzHPKucUjzEnGeRpb3yXOXR93gZW50YHC-ymkycwDnkzGqg3Mtpodl1RNwbIG5SzjTRIMk7O1DeTjed5vZEmElEKhQJijOIWZ8Je-1t2wsuhNNxLtZx_yLePbnaYx9gvpJsa3qdLLcrf37hUlMb6d-wuMb8_9Hzr-KwAA__8p7mMq">