[llvm] [WebAssembly, llvm] Add llvm.wasm.ref.test.func intrinsic (PR #147486)
Hood Chatham via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 22 00:24:11 PDT 2025
================
@@ -0,0 +1,66 @@
+; RUN: llc < %s -mcpu=mvp -mattr=+reference-types | FileCheck %s
+
+target triple = "wasm32-unknown-unknown"
+
+; CHECK-LABEL: test_fpsig_1:
+; CHECK: local.get 0
+; CHECK-NEXT: table.get __indirect_function_table
+; CHECK-NEXT: ref.test (f32, f64, i32) -> (f32)
+; CHECK-NEXT: call use
+; Function Attrs: nounwind
+define void @test_fpsig_1(ptr noundef %func) local_unnamed_addr #0 {
+entry:
+ %res = tail call i32 (ptr, ...) @llvm.wasm.ref.test.func(ptr %func, float 0.000000e+00, float 0.000000e+00, double 0.000000e+00, i32 0)
----------------
hoodmane wrote:
No (though my internal encoding supports it). I'll switch to `NParams, ..., NReturns, ...`. This also has the advantage of making void much more natural.
https://github.com/llvm/llvm-project/pull/147486
More information about the llvm-commits
mailing list