1 ; RUN: llc < %s --mtriple=wasm32-unknown-unknown -asm-verbose=false -mattr=+reference-types 2>&1 | FileCheck %s
3 %externref = type ptr addrspace(10)
5 define i32 @externref_to_int(%externref %ref) {
6 %i = ptrtoint %externref %ref to i32
10 ; CHECK-LABEL: externref_to_int:
11 ; CHECK-NEXT: .functype externref_to_int (externref) -> (i32)
12 ; CHECK-NEXT: .local i32
13 ; CHECK-NEXT: unreachable
14 ; CHECK-NEXT: local.get 1
15 ; CHECK-NEXT: end_function