[flang-commits] [flang] [mlir] [llvm][mlir][OpenMP] Support translation for linear clause in omp.wsloop and omp.simd (PR #139386)

via flang-commits flang-commits at lists.llvm.org
Wed Jul 9 22:55:45 PDT 2025


================
@@ -1816,8 +1816,7 @@ static void genSimdClauses(
   cp.processReduction(loc, clauseOps, reductionSyms);
   cp.processSafelen(clauseOps);
   cp.processSimdlen(clauseOps);
-
-  cp.processTODO<clause::Linear>(loc, llvm::omp::Directive::OMPD_simd);
+  cp.processLinear(clauseOps);
----------------
NimishMishra wrote:

I ran some tests, and the semantic checks were able to catch those cases. For instance, if the linear variable is anything other than an `integer` type, we get a semantic error noting that a linear variable with the REF modifier needs to be of integer type.

Do you think we should nevertheless add a check during FIR gen? I added a check during the translation but skipped adding it during FIR gen because of this reason.

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


More information about the flang-commits mailing list