Skip to content

[Flang][OpenMP] Use simdloop operation only for omp simd pragma #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion flang/lib/Lower/OpenMP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3789,7 +3789,16 @@ static void genOMP(Fortran::lower::AbstractConverter &converter,
}

// 2.9.3.1 SIMD construct
if (llvm::omp::allSimdSet.test(ompDirective)) {
// Process simd loop:
// !$ omp simd
// do-loop
// Worksharing loops like:
// !$ omp do simd
// do-loop
// should be processed as other worksharing loops
// and they should be represented by omp.wsloop operation
if ((llvm::omp::OMPD_simd == ompDirective) ||
(llvm::omp::OMPD_target_simd == ompDirective)) {
createSimdLoop(converter, eval, ompDirective, loopOpClauseList,
currentLocation);
} else {
Expand Down