This is an archive of the discontinued LLVM Phabricator instance.

[flang][openacc] Add support for complex mul reduction
ClosedPublic

Authored by clementval on Jul 11 2023, 1:32 PM.

Details

Summary

Add support to lower reduction with the multiply operator and
complex type.

Depends on D155007

Diff Detail

Event Timeline

clementval created this revision.Jul 11 2023, 1:32 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJul 11 2023, 1:32 PM
clementval requested review of this revision.Jul 11 2023, 1:32 PM

Rebase + update init value

razvanlupusoru added inline comments.Jul 13 2023, 9:48 AM
flang/lib/Lower/OpenACC.cpp
718

Can you swap the names. Use init0 for the 0.0 value and init1 for the 1.0 value?

720–722

This seems swapped. The real value should be 1 and imaginary should be 0.

flang/test/Lower/OpenACC/acc-reduction.f90
7

Can you also swap the CST0 and CST1 names to match the values. I think it will help readability.

clementval added inline comments.Jul 13 2023, 10:04 AM
flang/lib/Lower/OpenACC.cpp
718

I can. I named them in sequence and not really about the value they carry.

Address review comment

clementval marked 3 inline comments as done.Jul 13 2023, 10:07 AM
razvanlupusoru accepted this revision.Jul 13 2023, 10:33 AM

Looks great now! Thank you!

This revision is now accepted and ready to land.Jul 13 2023, 10:33 AM
This revision was landed with ongoing or failed builds.Jul 13 2023, 11:18 AM
This revision was automatically updated to reflect the committed changes.