1 ; RUN: llc -mtriple=aarch64-unknown-unknown -global-isel -verify-machineinstrs -stop-after=irtranslator %s -o - | FileCheck %s
3 define void @memset() {
4 ; CHECK-LABEL: name: memset
6 ; CHECK-NEXT: [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %stack.0.buf
7 ; CHECK-NEXT: RET_ReallyLR
9 %buf = alloca [512 x i8], align 1
10 call void @llvm.memset.p0.i32(ptr %buf, i8 undef, i32 512, i1 false)
14 define void @memcpy() {
15 ; CHECK-LABEL: name: memcpy
17 ; CHECK-NEXT: [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %stack.0.buf
18 ; CHECK-NEXT: RET_ReallyLR
20 %buf = alloca [512 x i8], align 1
21 call void @llvm.memcpy.p0.p0.i32(ptr %buf, ptr undef, i32 512, i1 false)
25 define void @memmove() {
26 ; CHECK-LABEL: name: memmove
28 ; CHECK-NEXT: [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %stack.0.buf
29 ; CHECK-NEXT: RET_ReallyLR
31 %buf = alloca [512 x i8], align 1
32 call void @llvm.memmove.p0.p0.i32(ptr %buf, ptr undef, i32 512, i1 false)
36 declare void @llvm.memset.p0.i32(ptr nocapture, i8, i32, i1) nounwind
37 declare void @llvm.memcpy.p0.p0.i32(ptr nocapture writeonly, ptr nocapture readonly, i32, i1) nounwind
38 declare void @llvm.memmove.p0.p0.i32(ptr nocapture, ptr nocapture, i32, i1) nounwind