mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-03 09:26:06 +00:00

Reland of 31859f896. This change implements new DAG notes GLOBAL_GET/GLOBAL_SET, and lowering methods for load and stores of reference types from IR globals. Once the lowering creates the new nodes, tablegen pattern matches those and converts them to Wasm global.get/set. Reviewed By: tlively Differential Revision: https://reviews.llvm.org/D104797
12 lines
365 B
LLVM
12 lines
365 B
LLVM
; RUN: not llc --mtriple=wasm32-unknown-unknown -asm-verbose=false -mattr=+reference-types < %s 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR
|
|
|
|
%extern = type opaque
|
|
%externref = type %extern addrspace(10)*
|
|
|
|
define void @store_extern(%externref %ref) {
|
|
store %extern undef, %externref %ref
|
|
ret void
|
|
}
|
|
|
|
; CHECK-ERROR: error: storing unsized types is not allowed
|