xref: /llvm-project/llvm/test/CodeGen/X86/2010-04-08-CoalescerBug.ll (revision 2f448bf509432c1a19ec46ab8cbc7353c03c6280)
1; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=core2 | FileCheck %s
2; rdar://7842028
3
4; Do not delete partially dead copy instructions.
5; dead %rdi = MOV64rr killed %rax, implicit-def %edi
6; REP_MOVSD implicit dead %ecx, implicit dead %edi, implicit dead %esi, implicit killed %ecx, implicit killed %edi, implicit killed %esi
7
8
9%struct.F = type { ptr, i32, i32, i8, i32, i32, i32 }
10%struct.FC = type { [10 x i8], [32 x i32], ptr, i32 }
11
12define void @t(ptr %this) nounwind {
13entry:
14; CHECK-LABEL: t:
15; CHECK: addq $12, %rsi
16  %BitValueArray = alloca [32 x i32], align 4
17  %tmp3 = load ptr, ptr %this, align 8
18  %tmp4 = getelementptr inbounds %struct.FC, ptr %tmp3, i64 0, i32 1, i64 0
19  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %BitValueArray, ptr align 4 %tmp4, i64 128, i1 false)
20  unreachable
21}
22
23declare void @llvm.memcpy.p0.p0.i64(ptr nocapture, ptr nocapture, i64, i1) nounwind
24