[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / CodeGen / builtins-memcpy-inline.c
blobeaa7ddd8530e4e8ba977a9be1363173e305bb4af
1 // REQUIRES: x86-registered-target
2 // RUN: %clang_cc1 -triple x86_64-unknown-linux -emit-llvm %s -o - | FileCheck %s
4 // CHECK-LABEL: define{{.*}} void @test_memcpy_inline_0(ptr noundef %dst, ptr noundef %src)
5 void test_memcpy_inline_0(void *dst, const void *src) {
6 // CHECK: call void @llvm.memcpy.inline.p0.p0.i64(ptr align 1 %0, ptr align 1 %1, i64 0, i1 false)
7 __builtin_memcpy_inline(dst, src, 0);
10 // CHECK-LABEL: define{{.*}} void @test_memcpy_inline_1(ptr noundef %dst, ptr noundef %src)
11 void test_memcpy_inline_1(void *dst, const void *src) {
12 // CHECK: call void @llvm.memcpy.inline.p0.p0.i64(ptr align 1 %0, ptr align 1 %1, i64 1, i1 false)
13 __builtin_memcpy_inline(dst, src, 1);
16 // CHECK-LABEL: define{{.*}} void @test_memcpy_inline_4(ptr noundef %dst, ptr noundef %src)
17 void test_memcpy_inline_4(void *dst, const void *src) {
18 // CHECK: call void @llvm.memcpy.inline.p0.p0.i64(ptr align 1 %0, ptr align 1 %1, i64 4, i1 false)
19 __builtin_memcpy_inline(dst, src, 4);
22 // CHECK-LABEL: define{{.*}} void @test_memcpy_inline_aligned_buffers(ptr noundef %dst, ptr noundef %src)
23 void test_memcpy_inline_aligned_buffers(unsigned long long *dst, const unsigned long long *src) {
24 // CHECK: call void @llvm.memcpy.inline.p0.p0.i64(ptr align 8 %0, ptr align 8 %1, i64 4, i1 false)
25 __builtin_memcpy_inline(dst, src, 4);