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

    <tr>
        <th>Summary</th>
        <td>
            [flang][openmp] Please address not yet implemented: Unhandled clause reduction in omp.simd operation
        </td>
    </tr>

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

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

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

<pre>
    A widely-used close-source app uses OpenMP SIMD reductions.  It would be great if this feature was implemented.  Thanks!

```
module foo
  implicit none

contains
  subroutine bar(arr,n_elem)
    integer i
    integer n_elem
    double precision arr(:),resul

    resul=0d0
 !$OMP SIMD REDUCTION(+:resul)
    do i=1,n_elem
       resul=resul+arr(i)*i
 enddo

  end subroutine bar
end module foo
```
```
% flang -fopenmp -c foo.f90
flang-21: warning: OpenMP support in flang is still experimental [-Wexperimental-option]
error: loc(".../foo.f90":11:8): not yet implemented: Unhandled clause reduction in omp.simd operation
error: loc(".../foo.f90":11:8): LLVM Translation failed for operation: omp.simd
error: failed to create the LLVM module
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJysVFFvpDYQ_jXmZQQyBjbsAw8kdKVIl-bU5trHyuBh162xkce-NP--Mmwue_dYnYSEPZ755ptvxpZE-mwRO9bcs2bIZAwX5zuiSZrVWcxGp966Hl61QvOWR0IFk3GEObnoJwS5rhAJCZ5XtE-f4ffHpwE8qjgF7SwVAI8BXl00CkaEs0cZQM8QLppgRhmiR3iVBHpZDS5oA6oC4OUi7T_ERMl4n74Dv368X5yKBmF2jvEetjg96QDWWdy9J2eD1Ja2c4qjdzFoizBKz0QrvWfiwf6FBhcmjpsTgLYBz-hB_7C_-u1G5eJoEFaPkybtLGxYLav6BCQePFI0O4fkvm-rgavEG1I1on5-1-i3X4YvDy-Pz78mBHHPqn73_0ZJOdCsGsoPtrv9Bvkacb_z0BuLfisBrVLunQpa9aMOvE_G77S8Ffm7tWhgNtKeIZ_dinZZIZ9STDEf0_l2louSVT28Sm-1PafldR4orqvzAbS9gmgCCtoYwH9X9Dq1XBpgzX3-560ld2saINYMiav3zidQ46ZNLlEUBROndxJCsKovE4M2aVD1YF2ANwy3Y5XMX-xFWmW2IZaR8GNSE0G3rAXpRYFb0cst_f_J_enTH0_w4qUls4HALHVKOTt_g1z13_LdZrn6BgdTuisI4YI74t6s2-ZkqqvUsTrKDLvyruG8Ltu6zS5dWR3ueCnnsZ3qo2gPjZJKCZQlYlOL9i7TneCi4YfywEVd87bgx7vpWM8tL6f6MDYtqzkuUpvCmK9L4fw500QRu7KuxZFnRo5oaHs0hNj6mnRohsx3KSAf45lYzY2mQB8QQQezvTR7RDOw5n6fKNYM8NmgJASplEein9XBLHrTXUJYabumJyZOZx0ucSwmtzBxSuSuv3z17m-cAhOnrVhi4nSt92sn_gsAAP__emqgpw">