1; RUN: llc -mtriple=aarch64-unknown-unknown -global-isel -verify-machineinstrs -stop-after=irtranslator %s -o - | FileCheck %s 2 3define void @memset() { 4 ; CHECK-LABEL: name: memset 5 ; CHECK: bb.1.entry: 6 ; CHECK-NEXT: [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %stack.0.buf 7 ; CHECK-NEXT: RET_ReallyLR 8entry: 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) 12 ret void 13} 14 15define void @memcpy() { 16 ; CHECK-LABEL: name: memcpy 17 ; CHECK: bb.1.entry: 18 ; CHECK-NEXT: [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %stack.0.buf 19 ; CHECK-NEXT: RET_ReallyLR 20entry: 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) 24 ret void 25} 26 27define void @memmove() { 28 ; CHECK-LABEL: name: memmove 29 ; CHECK: bb.1.entry: 30 ; CHECK-NEXT: [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %stack.0.buf 31 ; CHECK-NEXT: RET_ReallyLR 32entry: 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) 36 ret void 37} 38 39declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i1) nounwind 40declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture writeonly, i8* nocapture readonly, i32, i1) nounwind 41declare void @llvm.memmove.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i1) nounwind 42