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 %ptr = getelementptr inbounds [512 x i8], [512 x i8]* %buf, i32 0, i32 0
11 call void @llvm.memset.p0i8.i32(i8* %ptr, i8 undef, i32 512, i1 false)
15 define void @memcpy() {
16 ; CHECK-LABEL: name: memcpy
18 ; CHECK-NEXT: [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %stack.0.buf
19 ; CHECK-NEXT: RET_ReallyLR
21 %buf = alloca [512 x i8], align 1
22 %ptr = getelementptr inbounds [512 x i8], [512 x i8]* %buf, i32 0, i32 0
23 call void @llvm.memcpy.p0i8.p0i8.i32(i8* %ptr, i8* undef, i32 512, i1 false)
27 define void @memmove() {
28 ; CHECK-LABEL: name: memmove
30 ; CHECK-NEXT: [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %stack.0.buf
31 ; CHECK-NEXT: RET_ReallyLR
33 %buf = alloca [512 x i8], align 1
34 %ptr = getelementptr inbounds [512 x i8], [512 x i8]* %buf, i32 0, i32 0
35 call void @llvm.memmove.p0i8.p0i8.i32(i8* %ptr, i8* undef, i32 512, i1 false)
39 declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i1) nounwind
40 declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture writeonly, i8* nocapture readonly, i32, i1) nounwind
41 declare void @llvm.memmove.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i1) nounwind