[Mlir-commits] [mlir] [mlir][ptr] Add int_to_ptr && ptr_to_int ops (PR #190527)

Fabian Mora llvmlistbot at llvm.org
Mon Apr 6 08:55:45 PDT 2026


fabianmcg wrote:

Again, the fact they appear doesn't mean they are good or required. 

Take your example:
```mlir
      %a_ptr = tt.addptr %group_a_ptrs, %g : !tt.ptr<i64>, i32
      %a_ptr_6 = tt.load %a_ptr : !tt.ptr<i64>
      %a_ptr_7 = tt.int_to_ptr %a_ptr_6 : i64 -> !tt.ptr<f16>
```

It could be transformed into something like:

```mlir
      %a_ptr = tt.addptr %group_a_ptrs, %g : !tt.ptr<!tt.ptr<f16>>, i32
      %a_ptr_6 = tt.load %a_ptr : !tt.ptr<!tt.ptr<f16>>
```

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


More information about the Mlir-commits mailing list