Author: Simon Pilgrim
Date: 2020-09-08T11:59:38+01:00
New Revision: 58970eb7d1ddd067e98f49fdcfb04373086245bc

URL: 
https://github.com/llvm/llvm-project/commit/58970eb7d1ddd067e98f49fdcfb04373086245bc
DIFF: 
https://github.com/llvm/llvm-project/commit/58970eb7d1ddd067e98f49fdcfb04373086245bc.diff

LOG: [OpenMP] Fix typo in CodeGenFunction::EmitOMPWorksharingLoop (PR46412)

Fixes issue noticed by static analysis where we have a copy+paste typo, testing 
ScheduleKind.M1 twice instead of ScheduleKind.M2.

Differential Revision: https://reviews.llvm.org/D87250

Added: 
    

Modified: 
    clang/lib/CodeGen/CGStmtOpenMP.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp 
b/clang/lib/CodeGen/CGStmtOpenMP.cpp
index c1def6c88f0a..b9260892bd21 100644
--- a/clang/lib/CodeGen/CGStmtOpenMP.cpp
+++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp
@@ -2982,7 +2982,7 @@ bool CodeGenFunction::EmitOMPWorksharingLoop(
           ((ScheduleKind.Schedule == OMPC_SCHEDULE_static ||
             ScheduleKind.Schedule == OMPC_SCHEDULE_unknown) &&
            !(ScheduleKind.M1 == OMPC_SCHEDULE_MODIFIER_nonmonotonic ||
-             ScheduleKind.M1 == OMPC_SCHEDULE_MODIFIER_nonmonotonic)) ||
+             ScheduleKind.M2 == OMPC_SCHEDULE_MODIFIER_nonmonotonic)) ||
           ScheduleKind.M1 == OMPC_SCHEDULE_MODIFIER_monotonic ||
           ScheduleKind.M2 == OMPC_SCHEDULE_MODIFIER_monotonic;
       if ((RT.isStaticNonchunked(ScheduleKind.Schedule,


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to