1 ; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -mattr=+bulk-memory | FileCheck %s
3 ; Test that bulk memory intrinsics lower correctly
5 target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
6 target triple = "wasm32-unknown-unknown"
8 ; CHECK-LABEL: memory_init:
9 ; CHECK-NEXT: .functype memory_init (i32, i32, i32) -> ()
10 ; CHECK-NEXT: memory.init 3, 0, $0, $1, $2
12 declare void @llvm.wasm.memory.init(i32, i32, i8*, i32, i32)
13 define void @memory_init(i8* %dest, i32 %offset, i32 %size) {
14 call void @llvm.wasm.memory.init(
15 i32 3, i32 0, i8* %dest, i32 %offset, i32 %size
20 ; CHECK-LABEL: data_drop:
21 ; CHECK-NEXT: .functype data_drop () -> ()
22 ; CHECK-NEXT: data.drop 3
24 declare void @llvm.wasm.data.drop(i32)
25 define void @data_drop() {
26 call void @llvm.wasm.data.drop(i32 3)