This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Limit reduction support for pragma 'distribute' when combined with pragma 'simd'
ClosedPublic

Authored by carlo.bertolli on Feb 20 2018, 9:01 AM.

Details

Summary

This is a bug fix that removes the emission of reduction support for pragma 'distribute' when found alone or in combinations without simd.
Pragma 'distribute' does not have a reduction clause, but when combined with pragma 'simd' we need to emit the support for simd's reduction clause as part of code generation for distribute. This guard is similar to the one used for reduction support earlier in the same code gen function.

Diff Detail

Repository
rC Clang

Event Timeline

carlo.bertolli created this revision.Feb 20 2018, 9:01 AM

[OpenMP] Add regression test: this verifies that only one call to the runtime for reduction is done in a combined construct with distribute, without simd, and with at least one pragma accepting reduction as a clause.

ABataev accepted this revision.Feb 22 2018, 8:10 AM
This revision is now accepted and ready to land.Feb 22 2018, 8:10 AM
This revision was automatically updated to reflect the committed changes.