1 ; RUN: llc -mtriple=arm64_32-apple-ios9.0 -o - %s | FileCheck %s
3 define i64 @test_memcpy(ptr %addr, ptr %src, i1 %tst) minsize {
4 ; CHECK-LABEL: test_memcpy:
5 ; CHECK: ldr x[[VAL64:[0-9]+]], [x0]
7 ; CHECK: mov w0, w[[VAL64]]
10 %val64 = load i64, ptr %addr
11 br i1 %tst, label %true, label %false
17 %val32 = trunc i64 %val64 to i32
18 %val.ptr = inttoptr i32 %val32 to ptr
19 call void @llvm.memcpy.p0.p0.i32(ptr %val.ptr, ptr %src, i32 128, i32 0, i1 1)
23 define i64 @test_memmove(ptr %addr, ptr %src, i1 %tst) minsize {
24 ; CHECK-LABEL: test_memmove:
25 ; CHECK: ldr x[[VAL64:[0-9]+]], [x0]
27 ; CHECK: mov w0, w[[VAL64]]
30 %val64 = load i64, ptr %addr
31 br i1 %tst, label %true, label %false
37 %val32 = trunc i64 %val64 to i32
38 %val.ptr = inttoptr i32 %val32 to ptr
39 call void @llvm.memmove.p0.p0.i32(ptr %val.ptr, ptr %src, i32 128, i32 0, i1 1)
43 define i64 @test_memset(ptr %addr, ptr %src, i1 %tst) minsize {
44 ; CHECK-LABEL: test_memset:
45 ; CHECK: ldr x[[VAL64:[0-9]+]], [x0]
47 ; CHECK: mov w0, w[[VAL64]]
50 %val64 = load i64, ptr %addr
51 br i1 %tst, label %true, label %false
57 %val32 = trunc i64 %val64 to i32
58 %val.ptr = inttoptr i32 %val32 to ptr
59 call void @llvm.memset.p0.i32(ptr %val.ptr, i8 42, i32 256, i32 0, i1 1)
63 declare void @llvm.memcpy.p0.p0.i32(ptr, ptr, i32, i32, i1)
64 declare void @llvm.memmove.p0.p0.i32(ptr, ptr, i32, i32, i1)
65 declare void @llvm.memset.p0.i32(ptr, i8, i32, i32, i1)