[Mlir-commits] [llvm] [mlir] [mlir][LLVM] handle argument and result attributes in llvm.call and llvm.invoke (PR #123177)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Feb 7 05:12:46 PST 2025


================
@@ -0,0 +1,25 @@
+// RUN: mlir-translate -mlir-to-llvmir %s | FileCheck %s
+
+// CHECK-LABEL: @test
+llvm.func @test(%arg0: i16 {llvm.noundef, llvm.signext}) -> (i16 {llvm.signext}) attributes {personality = @__gxx_personality_v0} {
+  %0 = llvm.mlir.zero : !llvm.ptr
+  %1 = llvm.mlir.constant(0 : i16) : i16
+// CHECK:      invoke signext i16 @somefunc(i16 noundef signext %{{.*}})
+// CHECK-NEXT:   to label %{{.*}} unwind label %{{.*}}
----------------
jeanPerier wrote:

```suggestion
  // CHECK:      invoke signext i16 @somefunc(i16 noundef signext %{{.*}})
  // CHECK-NEXT:   to label %{{.*}} unwind label %{{.*}}
```

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


More information about the Mlir-commits mailing list