1 ; RUN: opt -memcpyopt -S -o - < %s | FileCheck %s
3 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
4 target triple = "x86_64-apple-macosx10.14.0"
6 %my_struct = type { i8, i32 }
8 ; Function Attrs: inaccessiblemem_or_argmemonly
9 declare noalias i8* @my_malloc(%my_struct*) #0
11 define void @my_func(%my_struct* %0) {
14 %1 = load %my_struct, %my_struct* %0
15 %2 = call i8* @my_malloc(%my_struct* %0)
16 %3 = bitcast i8* %2 to %my_struct*
17 store %my_struct %1, %my_struct* %3
18 ; CHECK-NOT: call void @llvm.memcpy.{{.*}}.{{.*}}.{{.*}}
22 attributes #0 = { inaccessiblemem_or_argmemonly }
24 !llvm.module.flags = !{!0, !1, !2}
27 !0 = !{i32 2, !"SDK Version", [2 x i32] [i32 10, i32 14]}
28 !1 = !{i32 1, !"wchar_size", i32 4}
29 !2 = !{i32 7, !"PIC Level", i32 2}
30 !3 = !{!"Apple LLVM version 10.0.1 (clang-1001.0.46.4)"}