1 ; RUN: llc < %s --mtriple=wasm32-unknown-unknown -asm-verbose=false -mattr=+reference-types | FileCheck %s
3 %funcref = type ptr addrspace(20) ;; addrspace 20 is nonintegral
5 @funcref_global = local_unnamed_addr addrspace(1) global %funcref undef
7 define void @set_funcref_global(%funcref %g) {
8 ;; this generates a global.set of @funcref_global
9 store %funcref %g, ptr addrspace(1) @funcref_global
13 ; CHECK-LABEL: set_funcref_global:
14 ; CHECK-NEXT: functype set_funcref_global (funcref) -> ()
15 ; CHECK-NEXT: local.get 0
16 ; CHECK-NEXT: global.set funcref_global
17 ; CHECK-NEXT: end_function
19 ; CHECK: .globl funcref_global