This is an archive of the discontinued LLVM Phabricator instance.

[Flang][OpenMP] Add support for real typed reductions in worksharing-loop
ClosedPublic

Authored by DylanFleming-arm on Aug 23 2022, 4:11 AM.

Details

Summary

Allows addition/multiplication reductions to be used with
real types by adding getReductionOperation() to OpenMP.cpp,
which can select either integer or floating-point instruction.

Diff Detail

Event Timeline

Herald added projects: Restricted Project, Restricted Project. · View Herald Transcript
DylanFleming-arm requested review of this revision.Aug 23 2022, 4:11 AM

Can you add tests for real(kind=8) as well?

flang/test/Lower/OpenMP/wsloop-reduction-add.f90
274

Nit: newline

Added test for kind=8

LG. A few nit comments to address before submission.

flang/lib/Lower/OpenMP.cpp
857–864

Add an assertion for the types that this function works.

873

Add an assertion for the types that this works.

flang/test/Lower/OpenMP/wsloop-reduction-add.f90
239

Nit: Use variable capture for %2,3,1,4

This revision is now accepted and ready to land.Aug 25 2022, 5:41 AM
flang/test/Lower/OpenMP/wsloop-reduction-add.f90