Skip to content

Commit affda91

Browse files
committed
Correct the number of generated loops
1 parent 572add0 commit affda91

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

clang/include/clang/AST/StmtOpenMP.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5790,7 +5790,9 @@ class OMPReverseDirective final : public OMPLoopTransformationDirective {
57905790
explicit OMPReverseDirective(SourceLocation StartLoc, SourceLocation EndLoc)
57915791
: OMPLoopTransformationDirective(OMPReverseDirectiveClass,
57925792
llvm::omp::OMPD_reverse, StartLoc,
5793-
EndLoc, 1) {}
5793+
EndLoc, 1) {
5794+
setNumGeneratedLoops(1);
5795+
}
57945796

57955797
void setPreInits(Stmt *PreInits) {
57965798
Data->getChildren()[PreInitsOffset] = PreInits;
@@ -5857,7 +5859,7 @@ class OMPInterchangeDirective final : public OMPLoopTransformationDirective {
58575859
: OMPLoopTransformationDirective(OMPInterchangeDirectiveClass,
58585860
llvm::omp::OMPD_interchange, StartLoc,
58595861
EndLoc, NumLoops) {
5860-
setNumGeneratedLoops(3 * NumLoops);
5862+
setNumGeneratedLoops(NumLoops);
58615863
}
58625864

58635865
void setPreInits(Stmt *PreInits) {

0 commit comments

Comments
 (0)