annotate clang/test/CodeGen/builtins-memcpy-inline.c @ 207:2e18cbf3894f

LLVM12
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 08 Jun 2021 06:07:14 +0900
parents 1d019706d866
children c4bab56944e8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // REQUIRES: x86-registered-target
anatofuz
parents:
diff changeset
2 // RUN: %clang_cc1 -triple x86_64-unknown-linux -emit-llvm %s -o - | FileCheck %s
anatofuz
parents:
diff changeset
3
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
4 // CHECK-LABEL: define{{.*}} void @test_memcpy_inline_0(i8* %dst, i8* %src)
150
anatofuz
parents:
diff changeset
5 void test_memcpy_inline_0(void *dst, const void *src) {
anatofuz
parents:
diff changeset
6 // CHECK: call void @llvm.memcpy.inline.p0i8.p0i8.i64(i8* align 1 %0, i8* align 1 %1, i64 0, i1 false)
anatofuz
parents:
diff changeset
7 __builtin_memcpy_inline(dst, src, 0);
anatofuz
parents:
diff changeset
8 }
anatofuz
parents:
diff changeset
9
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
10 // CHECK-LABEL: define{{.*}} void @test_memcpy_inline_1(i8* %dst, i8* %src)
150
anatofuz
parents:
diff changeset
11 void test_memcpy_inline_1(void *dst, const void *src) {
anatofuz
parents:
diff changeset
12 // CHECK: call void @llvm.memcpy.inline.p0i8.p0i8.i64(i8* align 1 %0, i8* align 1 %1, i64 1, i1 false)
anatofuz
parents:
diff changeset
13 __builtin_memcpy_inline(dst, src, 1);
anatofuz
parents:
diff changeset
14 }
anatofuz
parents:
diff changeset
15
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
16 // CHECK-LABEL: define{{.*}} void @test_memcpy_inline_4(i8* %dst, i8* %src)
150
anatofuz
parents:
diff changeset
17 void test_memcpy_inline_4(void *dst, const void *src) {
anatofuz
parents:
diff changeset
18 // CHECK: call void @llvm.memcpy.inline.p0i8.p0i8.i64(i8* align 1 %0, i8* align 1 %1, i64 4, i1 false)
anatofuz
parents:
diff changeset
19 __builtin_memcpy_inline(dst, src, 4);
anatofuz
parents:
diff changeset
20 }
anatofuz
parents:
diff changeset
21
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
22 // CHECK-LABEL: define{{.*}} void @test_memcpy_inline_aligned_buffers(i64* %dst, i64* %src)
150
anatofuz
parents:
diff changeset
23 void test_memcpy_inline_aligned_buffers(unsigned long long *dst, const unsigned long long *src) {
anatofuz
parents:
diff changeset
24 // CHECK: call void @llvm.memcpy.inline.p0i8.p0i8.i64(i8* align 8 %2, i8* align 8 %3, i64 4, i1 false)
anatofuz
parents:
diff changeset
25 __builtin_memcpy_inline(dst, src, 4);
anatofuz
parents:
diff changeset
26 }