1 ; RUN: opt < %s -O1 -S | FileCheck %s
3 ; performCallSlotOptzn in MemCpy should not exchange the calls to
4 ; @llvm.lifetime.start and @llvm.memcpy.
6 declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i1) #1
7 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #1
8 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #1
10 define void @_ZN4CordC2EOS_(i8* nocapture dereferenceable(16) %arg1) {
12 ; CHECK-LABEL: @_ZN4CordC2EOS_
13 ; CHECK-NOT: call void @llvm.lifetime.start
15 %tmp = alloca [8 x i8], align 8
16 %tmp5 = bitcast [8 x i8]* %tmp to i8*
17 call void @llvm.lifetime.start.p0i8(i64 16, i8* %tmp5)
18 %tmp10 = getelementptr inbounds i8, i8* %tmp5, i64 7
19 store i8 0, i8* %tmp10, align 1
20 call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %arg1, i8* align 8 %tmp5, i64 16, i1 false)
21 call void @llvm.lifetime.end.p0i8(i64 16, i8* %tmp5)
25 attributes #1 = { argmemonly nounwind }