1 ; RUN: opt -passes='require<profile-summary>,function(codegenprepare)' -mtriple=arm7-unknown-unknown -S < %s | FileCheck %s
3 declare void @llvm.memcpy.p0.p0.i32(ptr, ptr, i32, i1) nounwind
4 declare void @llvm.memmove.p0.p0.i32(ptr, ptr, i32, i1) nounwind
5 declare void @llvm.memset.p0.i32(ptr, i8, i32, i1) nounwind
7 define void @test_memcpy(ptr align 4 %dst, ptr align 8 %src, i32 %N) {
8 ; CHECK-LABEL: @test_memcpy
9 ; CHECK: call void @llvm.memcpy.p0.p0.i32(ptr align 4 %dst, ptr align 8 %src, i32 %N, i1 false)
10 ; CHECK: call void @llvm.memcpy.p0.p0.i32(ptr align 4 %dst, ptr align 8 %src, i32 %N, i1 false)
11 ; CHECK: call void @llvm.memcpy.p0.p0.i32(ptr align 8 %dst, ptr align 16 %src, i32 %N, i1 false)
13 call void @llvm.memcpy.p0.p0.i32(ptr %dst, ptr %src, i32 %N, i1 false)
14 call void @llvm.memcpy.p0.p0.i32(ptr align 2 %dst, ptr align 2 %src, i32 %N, i1 false)
15 call void @llvm.memcpy.p0.p0.i32(ptr align 8 %dst, ptr align 16 %src, i32 %N, i1 false)
19 define void @test_memmove(ptr align 4 %dst, ptr align 8 %src, i32 %N) {
20 ; CHECK-LABEL: @test_memmove
21 ; CHECK: call void @llvm.memmove.p0.p0.i32(ptr align 4 %dst, ptr align 8 %src, i32 %N, i1 false)
22 ; CHECK: call void @llvm.memmove.p0.p0.i32(ptr align 4 %dst, ptr align 8 %src, i32 %N, i1 false)
23 ; CHECK: call void @llvm.memmove.p0.p0.i32(ptr align 8 %dst, ptr align 16 %src, i32 %N, i1 false)
25 call void @llvm.memmove.p0.p0.i32(ptr %dst, ptr %src, i32 %N, i1 false)
26 call void @llvm.memmove.p0.p0.i32(ptr align 2 %dst, ptr align 2 %src, i32 %N, i1 false)
27 call void @llvm.memmove.p0.p0.i32(ptr align 8 %dst, ptr align 16 %src, i32 %N, i1 false)
31 define void @test_memset(ptr align 4 %dst, i8 %val, i32 %N) {
32 ; CHECK-LABEL: @test_memset
33 ; CHECK: call void @llvm.memset.p0.i32(ptr align 4 %dst, i8 %val, i32 %N, i1 false)
34 ; CHECK: call void @llvm.memset.p0.i32(ptr align 4 %dst, i8 %val, i32 %N, i1 false)
35 ; CHECK: call void @llvm.memset.p0.i32(ptr align 8 %dst, i8 %val, i32 %N, i1 false)
37 call void @llvm.memset.p0.i32(ptr %dst, i8 %val, i32 %N, i1 false)
38 call void @llvm.memset.p0.i32(ptr align 2 %dst, i8 %val, i32 %N, i1 false)
39 call void @llvm.memset.p0.i32(ptr align 8 %dst, i8 %val, i32 %N, i1 false)