[flang-commits] [flang] [flang][OpenMP] Add lowering for assume and assumes directives (PR #205615)

via flang-commits flang-commits at lists.llvm.org
Tue Jun 30 05:03:03 PDT 2026


================
@@ -5353,9 +5315,31 @@ static void genOMP(lower::AbstractConverter &converter, lower::SymMap &symTable,
                    semantics::SemanticsContext &semaCtx,
                    lower::pft::Evaluation &eval,
                    const parser::OmpAssumeDirective &assumeConstruct) {
-  mlir::Location clauseLocation = converter.genLocation(assumeConstruct.source);
-  if (!semaCtx.langOptions().OpenMPSimd)
-    TODO(clauseLocation, "OpenMP ASSUME construct");
+  if (!semaCtx.langOptions().OpenMPSimd) {
+    fir::FirOpBuilder &firOpBuilder = converter.getFirOpBuilder();
+    lower::StatementContext stmtCtx;
+
+    const parser::OmpDirectiveSpecification &beginSpec =
+        assumeConstruct.BeginDir();
+    for (const parser::OmpClause &clause : beginSpec.Clauses().v) {
+      const auto *holds = std::get_if<parser::OmpClause::Holds>(&clause.u);
+      if (!holds)
+        continue;
----------------
Ritanya-B-Bharadwaj wrote:

Okay.

https://github.com/llvm/llvm-project/pull/205615


More information about the flang-commits mailing list