<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/58186>58186</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [Flang][OpenMP] Reduction support for arrays
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          kiranchandramohan
      </td>
    </tr>
</table>

<pre>
    Support reduction of arrays in Flang. 

Check: Does OpenMP MLIR dialect or lowering need an extension for this?

```
subroutine reduction_array(y)
  integer :: x(100), y(100,100)
  !$omp parallel
  !$omp do reduction(+:x)
  do i=1, 100
    x = x + y(:,i)
  end do
  !$omp end do
  !$omp end parallel
  print *, x
end subroutine
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx9ktuO2yAQhp8G34waAY6d-MIXm0SRVtpVq-0DVNie2HQJWIDb5O07OEkT7UorYcMc-OcDpnHduf45jaPzETx2Uxu1s-AOoLxX5wDawt4o2y-A8R3jT5f_dsD2neVPsHMY4PuI9vUHvL48v0GnlcE2gvNg3F_02vZgETtQFvAU0Yakf6BwHHRg-f5RlpX8OmYzTI13U9QW72i_Zi4m1_RVlzQgyIg9eiCiBHWisOA8JcgtnG_W9uq7bmJSMLl0xxFG5ZUxaD5HOnevTDJMbkj_9CBCCZrlO5EKJfmrG-BEMLv0l5uZIKHJrX7Yiraj7Z9rfuX_SDrS_UbKSdp07Nmb8u439-FiM6xFWRa8WEm5yro676q8UlnU0WDNis381qzY0fLyqrSGt_99Ea6dkt7v0iDZ5E09xDiG-YR7Gr2Ow9QsWnckw5g_t-nb6N1v6g0ydQgTBloUa7Eus6EuRNuuD0KpblkccKVQloWoVhxzIdvq0GRGNWhCQiSiTNeSS0kXXgpR5MvVYo18qTivylK0nAy25HhU2ixS4YXzfebrmaGZ-kBBo0MM96AKQffUpjd9NcXB-fpde2XbQdnOq6OjOZvB65n6Hx_P9Qw">