Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGen / mempcpy-libcall.c
blob89e3797e9e30cded0282daa7d5e50da95fc746ef
1 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm < %s| FileCheck %s
3 typedef __SIZE_TYPE__ size_t;
5 void *mempcpy(void *, void const *, size_t);
7 char *test(char *d, char *s, size_t n) {
8 // CHECK: call void @llvm.memcpy.p0.p0.i64(ptr {{.*}} %[[REG1:[^ ]+]], ptr {{.*}} %1, i64 %[[REG2:[^ ]+]], i1 false)
9 // CHECK-NEXT: %[[REGr:[^ ]+]] = getelementptr inbounds i8, ptr %[[REG1]], i64 %[[REG2]]
10 // CHECK-NEXT: ret ptr %[[REGr]]
11 return mempcpy(d, s, n);