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