Files
clang-p2996/llvm/test/CodeGen/WebAssembly/memory-addr32.ll
JF Bastien b6091dfe0f WebAssembly: emit (func (param t) (result t)) s-expressions
Summary: Match spec format: https://github.com/WebAssembly/spec/blob/master/ml-proto/test/fac.wasm

Reviewers: sunfish

Subscribers: llvm-commits, jfb

Differential Revision: http://reviews.llvm.org/D12307

llvm-svn: 245986
2015-08-25 22:58:05 +00:00

18 lines
492 B
LLVM

; RUN: llc < %s -asm-verbose=false | FileCheck %s
; Test that basic memory operations assemble as expected with 32-bit addresses.
target datalayout = "e-p:32:32-i64:64-n32:64-S128"
target triple = "wasm32-unknown-unknown"
declare i32 @llvm.wasm.page.size.i32() nounwind readnone
; CHECK-LABEL: (func $page_size
; CHECK-NEXT: (result i32)
; CHECK-NEXT: (setlocal @0 (page_size))
; CHECK-NEXT: (return @0)
define i32 @page_size() {
%a = call i32 @llvm.wasm.page.size.i32()
ret i32 %a
}