[Mlir-commits] [mlir] [MLIR][LLVMIR] Import unregistered intrinsics via llvm.intrinsic_call (PR #128626)

Tobias Gysi llvmlistbot at llvm.org
Tue Feb 25 23:21:21 PST 2025


================
@@ -0,0 +1,68 @@
+; RUN: mlir-translate -import-llvm %s -split-input-file | FileCheck %s
+
+declare i64 @llvm.aarch64.ldxr.p0(ptr)
+
+define dso_local void @t0(ptr %a) {
+  %x = call i64 @llvm.aarch64.ldxr.p0(ptr elementtype(i8) %a)
+  ret void
+}
+
+; CHECK-LABEL: llvm.func @llvm.aarch64.ldxr.p0(!llvm.ptr)
+; CHECK-LABEL: llvm.func @t0
+; CHECK:   llvm.call_intrinsic "llvm.aarch64.ldxr.p0"({{.*}}) : (!llvm.ptr) -> i64
+; CHECK:   llvm.return
+; CHECK: }
+
+; -----
----------------
gysit wrote:

```suggestion
; // -----
```
nit: I think the slashes are needed here and below to work as splitters.

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


More information about the Mlir-commits mailing list