brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · e96b6bf Raw
39 lines · plain
1; RUN: llc -mtriple=aarch64-unknown-unknown -global-isel -verify-machineinstrs -stop-after=irtranslator %s -o - | FileCheck %s2 3define void @memset() {4  ; CHECK-LABEL: name: memset5  ; CHECK: bb.1.entry:6  ; CHECK-NEXT:   [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %stack.0.buf7  ; CHECK-NEXT:   RET_ReallyLR8entry:9  %buf = alloca [512 x i8], align 110  call void @llvm.memset.p0.i32(ptr %buf, i8 undef, i32 512, i1 false)11  ret void12}13 14define void @memcpy() {15  ; CHECK-LABEL: name: memcpy16  ; CHECK: bb.1.entry:17  ; CHECK-NEXT:   [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %stack.0.buf18  ; CHECK-NEXT:   RET_ReallyLR19entry:20  %buf = alloca [512 x i8], align 121  call void @llvm.memcpy.p0.p0.i32(ptr %buf, ptr undef, i32 512, i1 false)22  ret void23}24 25define void @memmove() {26  ; CHECK-LABEL: name: memmove27  ; CHECK: bb.1.entry:28  ; CHECK-NEXT: [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %stack.0.buf29  ; CHECK-NEXT: RET_ReallyLR30entry:31  %buf = alloca [512 x i8], align 132  call void @llvm.memmove.p0.p0.i32(ptr %buf, ptr undef, i32 512, i1 false)33  ret void34}35 36declare void @llvm.memset.p0.i32(ptr nocapture, i8, i32, i1) nounwind37declare void @llvm.memcpy.p0.p0.i32(ptr nocapture writeonly, ptr nocapture readonly, i32, i1) nounwind38declare void @llvm.memmove.p0.p0.i32(ptr nocapture, ptr nocapture, i32, i1) nounwind39