150
|
1 // REQUIRES: x86-registered-target
|
|
2 // RUN: %clang_cc1 -triple x86_64-unknown-linux -emit-llvm %s -o - | FileCheck %s
|
|
3
|
207
|
4 // CHECK-LABEL: define{{.*}} void @test_memcpy_inline_0(i8* %dst, i8* %src)
|
150
|
5 void test_memcpy_inline_0(void *dst, const void *src) {
|
|
6 // CHECK: call void @llvm.memcpy.inline.p0i8.p0i8.i64(i8* align 1 %0, i8* align 1 %1, i64 0, i1 false)
|
|
7 __builtin_memcpy_inline(dst, src, 0);
|
|
8 }
|
|
9
|
207
|
10 // CHECK-LABEL: define{{.*}} void @test_memcpy_inline_1(i8* %dst, i8* %src)
|
150
|
11 void test_memcpy_inline_1(void *dst, const void *src) {
|
|
12 // CHECK: call void @llvm.memcpy.inline.p0i8.p0i8.i64(i8* align 1 %0, i8* align 1 %1, i64 1, i1 false)
|
|
13 __builtin_memcpy_inline(dst, src, 1);
|
|
14 }
|
|
15
|
207
|
16 // CHECK-LABEL: define{{.*}} void @test_memcpy_inline_4(i8* %dst, i8* %src)
|
150
|
17 void test_memcpy_inline_4(void *dst, const void *src) {
|
|
18 // CHECK: call void @llvm.memcpy.inline.p0i8.p0i8.i64(i8* align 1 %0, i8* align 1 %1, i64 4, i1 false)
|
|
19 __builtin_memcpy_inline(dst, src, 4);
|
|
20 }
|
|
21
|
207
|
22 // CHECK-LABEL: define{{.*}} void @test_memcpy_inline_aligned_buffers(i64* %dst, i64* %src)
|
150
|
23 void test_memcpy_inline_aligned_buffers(unsigned long long *dst, const unsigned long long *src) {
|
|
24 // CHECK: call void @llvm.memcpy.inline.p0i8.p0i8.i64(i8* align 8 %2, i8* align 8 %3, i64 4, i1 false)
|
|
25 __builtin_memcpy_inline(dst, src, 4);
|
|
26 }
|