This is an archive of the discontinued LLVM Phabricator instance.

[Flang][OpenMP] Add support for OpenMP max reduction
ClosedPublic

Authored by kiranchandramohan on Mar 1 2023, 10:12 AM.

Details

Summary

This patch adds support for reduction of max-intrinsic for scalar
types. Max is lowered as a compare-select in the default lowering
flow for Flang. This pattern is matched and replaced with the
OpenMP dialect reduction operation.

Note: This is a temporary flow. The plan is to move to a flow where
the OpenMP reduction operation is inserted during lowering.

Diff Detail

Event Timeline

Herald added projects: Restricted Project, Restricted Project. · View Herald Transcript
kiranchandramohan requested review of this revision.Mar 1 2023, 10:12 AM

Change name of operation in assert to fix CI failure.

do accepted this revision.Mar 14 2023, 7:49 AM

LGTM.

This revision is now accepted and ready to land.Mar 14 2023, 7:49 AM
This revision is now accepted and ready to land.Mar 14 2023, 12:02 PM
flang/lib/Lower/OpenMP.cpp