[Mlir-commits] [mlir] [mlir][core|ptr] Add `PtrLikeTypeInterface` and casting ops to the `ptr` dialect (PR #137469)

Fabian Mora llvmlistbot at llvm.org
Sun Apr 27 05:07:10 PDT 2025


================
@@ -52,6 +121,36 @@ def Ptr_PtrAddOp : Pointer_Op<"ptr_add", [
   }];
 }
 
+//===----------------------------------------------------------------------===//
+// ToPtrOp
+//===----------------------------------------------------------------------===//
+
+def Ptr_ToPtrOp : Pointer_Op<"to_ptr", [Pure]> {
----------------
fabianmcg wrote:

This is one 100% a replacement. `to_ptr %memref` should give you a ptr to the aligned buffer, and already as a ptr type instead of an it.

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


More information about the Mlir-commits mailing list