146667a10SPaulo Matos; RUN: llc < %s --mtriple=wasm32-unknown-unknown -asm-verbose=false -mattr=+reference-types | FileCheck %s 2*5c92f233SHeejin Ahn; Test for MIR printing of reference types in other address spaces. This should 3*5c92f233SHeejin Ahn; not error out. 4*5c92f233SHeejin Ahn; RUN: llc < %s --mtriple=wasm32-unknown-unknown -asm-verbose=false -mattr=+reference-types -print-after=finalize-isel | FileCheck %s 546667a10SPaulo Matos 680fb7823SAlex Bradbury%externref = type ptr addrspace(10) ;; addrspace 10 is nonintegral 746667a10SPaulo Matos 846667a10SPaulo Matos@externref_global = local_unnamed_addr addrspace(1) global %externref undef 946667a10SPaulo Matos 1046667a10SPaulo Matosdefine %externref @return_externref_global() { 1146667a10SPaulo Matos ;; this generates a global.get of @externref_global 1280fb7823SAlex Bradbury %ref = load %externref, ptr addrspace(1) @externref_global 1346667a10SPaulo Matos ret %externref %ref 1446667a10SPaulo Matos} 1546667a10SPaulo Matos 1646667a10SPaulo Matos; CHECK-LABEL: return_externref_global: 1746667a10SPaulo Matos; CHECK-NEXT: functype return_externref_global () -> (externref) 1846667a10SPaulo Matos; CHECK-NEXT: global.get externref_global 1946667a10SPaulo Matos; CHECK-NEXT: end_function 2046667a10SPaulo Matos 2146667a10SPaulo Matos; CHECK: .globl externref_global 22