Skip to content

Commit 21c5c42

Browse files
committed
Only emit unordered loops as omp loops
1 parent d643f98 commit 21c5c42

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

flang/lib/Optimizer/Builder/HLFIRTools.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -858,6 +858,7 @@ hlfir::LoopNest hlfir::genLoopNest(mlir::Location loc,
858858
fir::FirOpBuilder &builder,
859859
mlir::ValueRange extents, bool isUnordered,
860860
bool emitWorkshareLoop) {
861+
emitWorkshareLoop = emitWorkshareLoop && isUnordered;
861862
hlfir::LoopNest loopNest;
862863
assert(!extents.empty() && "must have at least one extent");
863864
mlir::OpBuilder::InsertionGuard guard(builder);

0 commit comments

Comments
 (0)