<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/137764>137764</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
32-bit registers store variables of unsigned char type without zero extension
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
zhaojiangkun-1
</td>
</tr>
</table>
<pre>
I found that the 32-bit register stores unsigned char type variables without zero extension in x86.
However, in arm and gcc x86, there are zero extension instructions.
In gcc x86, `movzx edi and dil `are used.
In ARM, `and x8, x0, #0xff` are used to implement this function.
Why does x86 not have zero extension instructions? Is this a bug?
https://godbolt.org/z/4PWhnz7a5
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJx8ks-OnDwQxJ_GXFozMubfcOAw3xeh7CFSlMueDW6wN2CP7PYsM08fmZ0oq80qJ0TR9euiVTIEM1vEjlX_sepLJiNp57u7lu7FSDv_jPaQZ4NTt-4JJhetAtKSgDRCIQ6DIfA4m0DoIZDzGCDaHalg1NID3S4IV-mNHBYM8GpIu0hwR-8AN0IbjLNgLGyn-sj4-at7xSt6Jv5PovQrSKtgHsc0kFTS6BGkx78ZgXwcyTgbEunJvrexmq_uet8AldmRyixJTKAYUD0c5x_fHtNpZjull43vkij4Nk2s5vDbA-TArJcFV7TpJCbAFO2eIOEYPz_rGyiHIaUA6wi0vP4zOCt6eApvLAlDnFnRM37WRJfAijMTPRP97NTgFjo6PzPR35noy-_P2t4bWWWqK1RbtDLDLm_Kqs15W_BMd-0oTnU-nfJa1pPCpi5zXoxyQlErKZshM53gouKlaHmTVwU_ttV4kmKYympQXE0DKzmu0izHZbmuaXdmQojY5UXT1GW2yAGXsPdICIuvsH9lQqRa-S6ZDkOcAyv5YgKFPxgytGD3oU3hrU7vquOmz6r1eaGy6Jfuw9EM6TgcR7cy0afdj8fh4t0LjsREvycOTPSPX7p24lcAAAD___BlCcI">