brintos

brintos / llvm-project-archived public Read only

0
0
Text · 647 B · ca2feb6 Raw
20 lines · plain
1; RUN: llc < %s --mtriple=wasm32-unknown-unknown -asm-verbose=false -mattr=+reference-types | FileCheck %s2 3%funcref = type ptr addrspace(20) ;; addrspace 20 is nonintegral4 5@funcref_global = local_unnamed_addr addrspace(1) global %funcref undef6 7define void @set_funcref_global(%funcref %g) {8  ;; this generates a global.set of @funcref_global9  store %funcref %g, ptr addrspace(1) @funcref_global10  ret void11}12 13; CHECK-LABEL: set_funcref_global:14; CHECK-NEXT: functype       set_funcref_global (funcref) -> ()15; CHECK-NEXT: local.get      016; CHECK-NEXT: global.set     funcref_global17; CHECK-NEXT: end_function18 19; CHECK: .globl funcref_global20