[Mlir-commits] [mlir] [MLIR][LLVM] Import dereferenceable metadata from LLVM IR (PR #130974)

Johannes de Fine Licht llvmlistbot at llvm.org
Thu Mar 13 03:12:21 PDT 2025


================
@@ -0,0 +1,7 @@
+// RUN: mlir-opt --allow-unregistered-dialect -split-input-file -verify-diagnostics %s
+
+llvm.func @deref(%arg0: !llvm.ptr) {
+    // expected-error @+1 {{op expected op to return a single LLVM pointer type}}
+    %0 = llvm.load %arg0 dereferenceable<bytes = 8> {alignment = 8 : i64} : !llvm.ptr -> i64
+    llvm.return
----------------
definelicht wrote:

```suggestion
  // expected-error @below {{op expected op to return a single LLVM pointer type}}
  %0 = llvm.load %arg0 dereferenceable<bytes = 8> {alignment = 8 : i64} : !llvm.ptr -> i64
  llvm.return
```

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


More information about the Mlir-commits mailing list