[Mlir-commits] [clang] [mlir] [OpenACC] Implement tile/collapse lowering (PR #138576)

Erich Keane llvmlistbot at llvm.org
Tue May 6 06:21:32 PDT 2025


================
@@ -82,6 +83,17 @@ class OpenACCClauseCIREmitter final
     return conversionOp.getResult(0);
   }
 
+  mlir::Value createConstantInt(mlir::Location loc, unsigned width,
+                                int64_t value) {
+    mlir::IntegerType ty = mlir::IntegerType::get(
+        &cgf.getMLIRContext(), width,
+        mlir::IntegerType::SignednessSemantics::Signless);
+    auto constOp = builder.create<mlir::arith::ConstantOp>(
----------------
erichkeane wrote:

The OpenACC dialect doesn't understand non-base-MLIR types, so if I were to do a non-arith dialect constant, I'd have to use an unrealized conversion cast, which ends up failing verifier for not being a known const.

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


More information about the Mlir-commits mailing list