================
@@ -3691,6 +3711,22 @@ static void
emitDistributeParallelForDistributeInnerBoundParams(
CapturedVars.push_back(UBCast);
}
+static void emitLoopIterationspaceVars(CodeGenFunction &CGF,
+ const OMPLoopDirective &S) {
+ // Emit the loop iteration variable.
+ const auto *IVExpr = cast<DeclRefExpr>(S.getIterationVariable());
+ CGF.EmitVarDecl(*cast<VarDecl>(IVExpr->getDecl()));
+
+ // Emit the iterations count variable.
+ // If it is not a variable, Sema decided to calculate iterations count on
each
+ // iteration (e.g., it is foldable into a constant).
+ if (const auto *LIExpr = dyn_cast<DeclRefExpr>(S.getLastIteration())) {
----------------
dhruvachak wrote:
Your tests have constant upper bounds, e.g. 1024. This path is never tested.
https://github.com/llvm/llvm-project/pull/224041
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits