<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/150452>150452</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[flang] Create the real constant directly with the argument type.
</td>
</tr>
<tr>
<th>Labels</th>
<td>
flang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
c8ef
</td>
</tr>
</table>
<pre>
See the discussion in #149525.
Currently, we create the float64 type directly, and then another cast is applied, which has two drawbacks.
- It may lead to suboptimal precision for f128.
- It introduces a redundant cast for f32.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxEkU2OozAQhU9jNqVGuLBJsmCRSSvSrOcExi7AM8ZGdtFRbj-CpNUrL_x-6ukzpfgpEvVC_xL6szIbzyn39kxjNST37P8QAc8Ezhe7leJTBB9BYCvVRaOuRXMVzfW25UyRw1PgDR4ENpPhl3EMyXCngJ_rnpLJvmUmul0QwcTEM2WwpjD4AmZdgyd3RM3ezjCbAvxI4LJ5DMb-K-_WD_jNsJgnBDIOOEHZhrSyX0yANZP1x7ljyjBKPNffDh85J7dZKmAgk9uiM5Ff9Ye4xV1bub51l_ZiKurlSbftSUlU1dxfzgOdWtl1Tlo5KGk721nSw7lxWqG7VL7HBnVzQiU7xEbVjRqdHFXXaYktoRKqocX4UIfwtdQpT5UvZaNe6kZprIIZKJQDCeIYTJwE4k4n97vhY9imIlQTfOHyE8Gew8Hx5dCfcPuhkMkEsCkW3qd-Y4CH5_n4N3naFop8YKqrLYd-Zl6LaK8C7wLvk-d5G2qbFoH3vfP9fKw5_SXLAu_HhiLw_p7x1eP_AAAA___nM8T7">