<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/65194>65194</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[flang] call memset to initialise when the value to be filled is zero
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
vfdff
</td>
</tr>
</table>
<pre>
* test: https://gcc.godbolt.org/z/Te3c73K9h
```
subroutine cloud_0(nlay, a, c, cond)
integer, intent(in) :: nlay
logical, dimension(nlay), intent(in) :: cond
real(kind=8), intent(out) :: a(:)
integer :: i
do i = 1,nlay
a(i) = 0.
enddo
end subroutine cloud_0
```
* call memset to initialise usually benefit to the performance because the library is optimized manually.
now the **classic-flang(old flang)** call memset when the value to be filled is zero.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMU02PmzAQ_TXmMtrIjCEJBw7pRrn02nvljwHcGjvCZlfZX1_ZSbMf3VaVkDHMzHtvnj0yRjt6op61X1h7rOSaprD0T4MZhkoFc-kZHiBRTEwcYErpHJk4MDwxPI1ab8ZgVHBpE5aR4emF4ekbCb0TX7uJ8SPjB7blt6d8xlUtYU3WE2gXVvOdM9x7Jy8MH0HmRZcleMOwu9YAAFifaKQlx_LWJ4Z76xl2kOWIAxSMe7oLo9XS5XQwdiYfbfB3pu7vMIX4DrNQxtj_tN4wcdx_rAxrelMqGe6LN3_K_p1ib57c4yaABSaOUDN8fN8CQEG0V4Yj8M1rjLwx4S0WeQOfWPvZCdxWPICWzsFMc6QEKYD1NlnpbCRY4yqdu4AiT4Mt0TQRnGkZwjJLrwkUablGKv-dVYtcLmAjhHOys30hA7P0BeQu24fnks0ws2uXr55-GJz0Y_bSGbjtu2vGO33PE_lS_STdSlmQIhisc2Qy7QstYVOZXphOdLKivt52You43e2qqZdDuxW7YagbrmopxQ6boeXUCMXVvuWmsj1yFLzjyLFpxG6zq2lfa25MJ1VLtWINp1lat3Huac6XvbIxrtRv27prKicVuVhGCNHTM5QgQ8wTtfS55kGtY2QNdzam-IqSbHJl9q6tt8d_HMp_WFCti-s_DKlN06o2OswMT5n39no4L-EH6cTwVNRGhqfSza8AAAD__5iJPE8">