Skip to content

Commit d368f44

Browse files
committed
handle review comments
1 parent 39740f6 commit d368f44

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

flang/lib/Optimizer/OpenMP/GenericLoopConversion.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ class GenericLoopConversionPattern
5757
rewriteToWsloop(loopOp, rewriter);
5858
break;
5959
case GenericLoopCombinedInfo::TeamsLoop:
60-
if (teamsLoopCanBeParallelFor(loopOp))
60+
if (teamsLoopCanBeParallelFor(loopOp)) {
6161
rewriteToDistributeParallelDo(loopOp, rewriter);
62-
else {
62+
} else {
6363
auto teamsOp = llvm::cast<mlir::omp::TeamsOp>(loopOp->getParentOp());
6464
auto teamsBlockArgIface =
6565
llvm::cast<mlir::omp::BlockArgOpenMPOpInterface>(*teamsOp);

flang/test/Lower/OpenMP/loop-directive.f90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ subroutine multi_block_teams
361361

362362

363363
! Verifies that reductions are hoisted to the parent `teams` directive and removed
364-
! from the `loop` dreictive when `loop` is mapped to `distribute`.
364+
! from the `loop` directive when `loop` is mapped to `distribute`.
365365

366366
! CHECK-LABEL: func.func @_QPteams_loop_cannot_be_parallel_for_with_reductions
367367
subroutine teams_loop_cannot_be_parallel_for_with_reductions
@@ -388,10 +388,10 @@ subroutine teams_loop_cannot_be_parallel_for_with_reductions
388388
! CHECK: omp.terminator
389389
! CHECK: }
390390
!$omp teams loop reduction(+: x) reduction(*: y) private(p)
391-
DO i = 1, 5
391+
do i = 1, 5
392392
call foo()
393393
x = x + i
394394
y = y * i
395395
p = 42
396-
END DO
396+
end do
397397
end subroutine

0 commit comments

Comments
 (0)