<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/56951>56951</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
fldX instructions are not generated
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
pmor13
</td>
</tr>
</table>
<pre>
This code:
```
float f(void)
{
return 1.0f;
}
```
leads to:
```
.LCPI0_0:
.long 0x3f800000 # float 1
f: # @f
movss xmm0, dword ptr [rip + .LCPI0_0] # xmm0 = mem[0],zero,zero,zero
ret
```
while it can be:
```
f: # @f
fld1
ret
```
Documentation: https://www.felixcloutier.com/x86/fld1:fldl2t:fldl2e:fldpi:fldlg2:fldln2:fldz.
Any ideas / thoughts / comments?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJylUk2P2yAQ_TX4gmph8Ed88CHZKFKlHnroobcKm7FNhY0FOMnur-_YcbZNlZUqdYSYgRnmvQfUVr1W33rtaWMVELEn7EjYnuRsG-uyNVYG2hK-O1utCC-3quJwCyiagzC7kSYxa4k43AuOT_sZkMrTYD_Ci7-8fP3MfrD3PN0sNnbs0LOraHdsMfrUCBf0RjrZFGCr56XPjpIURTwAD_bsPfrrMDDCX6i6WKfoFBwl2cHpCY8d6Dvt7Li2WYopEUc6wIBlyz6efQNn_3IPUHiRTy_l0msDVAfayJHWH7_VfyptjUr-jdBtPtpmHmAMMmg7Lth9CJNf2PETjsvlErdg9LUxdg4aXNzYAfevuxznFUzg_1KGh3sAt2DS20bHt2Dcgrf4TwL78ZVqBdKjoBMNvZ27PtwWCLVQQzanCKokz8qC5SLlkaqEKkUpo6CDgQp7fqd69MHNzSLDU-mAjjbQDkZwMoCKZmeqR2mdDv1cb3qMOd_dp8nZn9AEXGrvZ_AYZHmZJVFfFaKFshYASZbnoMpCcsmblGdNneZpXkdG1mB8hd8Ff0ukK844ZzuWJUJwnsSpZIlMmiJPU1E0WYLvB4PUJl6AY-u6yFUrh3ruPCaN9sH_TkrvdTcC3PvLGe_LVdNgXSKilW21Uv0F94Eatw">