89 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc %s -mtriple=x86_64-unknown-linux-gnu -mcpu=corei7 -o - | FileCheck %s3 4 5target triple = "x86_64-unknown-linux-gnu"6 7define void @merge_double(ptr noalias nocapture %st, ptr noalias nocapture readonly %ld) #0 {8; CHECK-LABEL: merge_double:9; CHECK: # %bb.0:10; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero11; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero12; CHECK-NEXT: movsd %xmm0, (%rdi)13; CHECK-NEXT: movsd %xmm1, 8(%rdi)14; CHECK-NEXT: movsd %xmm0, 16(%rdi)15; CHECK-NEXT: movsd %xmm1, 24(%rdi)16; CHECK-NEXT: retq17 %ld_idx1 = getelementptr inbounds double, ptr %ld, i64 118 %ld0 = load double, ptr %ld, align 8, !tbaa !219 %ld1 = load double, ptr %ld_idx1, align 8, !tbaa !220 21 %st_idx1 = getelementptr inbounds double, ptr %st, i64 122 %st_idx2 = getelementptr inbounds double, ptr %st, i64 223 %st_idx3 = getelementptr inbounds double, ptr %st, i64 324 25 store double %ld0, ptr %st, align 8, !tbaa !226 store double %ld1, ptr %st_idx1, align 8, !tbaa !227 store double %ld0, ptr %st_idx2, align 8, !tbaa !228 store double %ld1, ptr %st_idx3, align 8, !tbaa !229 ret void30}31 32define void @merge_loadstore_int(ptr noalias nocapture readonly %p, ptr noalias nocapture %q) local_unnamed_addr #0 {33; CHECK-LABEL: merge_loadstore_int:34; CHECK: # %bb.0: # %entry35; CHECK-NEXT: movq (%rdi), %rax36; CHECK-NEXT: movq 8(%rdi), %rcx37; CHECK-NEXT: movq %rax, (%rsi)38; CHECK-NEXT: movq %rcx, 8(%rsi)39; CHECK-NEXT: movq %rax, 16(%rsi)40; CHECK-NEXT: movq %rcx, 24(%rsi)41; CHECK-NEXT: retq42entry:43 %0 = load i64, ptr %p, align 8, !tbaa !144 %arrayidx1 = getelementptr inbounds i64, ptr %p, i64 145 %1 = load i64, ptr %arrayidx1, align 8, !tbaa !146 store i64 %0, ptr %q, align 8, !tbaa !147 %arrayidx3 = getelementptr inbounds i64, ptr %q, i64 148 store i64 %1, ptr %arrayidx3, align 8, !tbaa !149 %arrayidx4 = getelementptr inbounds i64, ptr %q, i64 250 store i64 %0, ptr %arrayidx4, align 8, !tbaa !151 %arrayidx5 = getelementptr inbounds i64, ptr %q, i64 352 store i64 %1, ptr %arrayidx5, align 8, !tbaa !153 ret void54}55 56define i64 @merge_loadstore_int_with_extra_use(ptr noalias nocapture readonly %p, ptr noalias nocapture %q) local_unnamed_addr #0 {57; CHECK-LABEL: merge_loadstore_int_with_extra_use:58; CHECK: # %bb.0: # %entry59; CHECK-NEXT: movq (%rdi), %rax60; CHECK-NEXT: movq 8(%rdi), %rcx61; CHECK-NEXT: movq %rax, (%rsi)62; CHECK-NEXT: movq %rcx, 8(%rsi)63; CHECK-NEXT: movq %rax, 16(%rsi)64; CHECK-NEXT: movq %rcx, 24(%rsi)65; CHECK-NEXT: retq66entry:67 %0 = load i64, ptr %p, align 8, !tbaa !168 %arrayidx1 = getelementptr inbounds i64, ptr %p, i64 169 %1 = load i64, ptr %arrayidx1, align 8, !tbaa !170 store i64 %0, ptr %q, align 8, !tbaa !171 %arrayidx3 = getelementptr inbounds i64, ptr %q, i64 172 store i64 %1, ptr %arrayidx3, align 8, !tbaa !173 %arrayidx4 = getelementptr inbounds i64, ptr %q, i64 274 store i64 %0, ptr %arrayidx4, align 8, !tbaa !175 %arrayidx5 = getelementptr inbounds i64, ptr %q, i64 376 store i64 %1, ptr %arrayidx5, align 8, !tbaa !177 ret i64 %078 79}80 81attributes #0 = { "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" }82 83 84!0 = !{!"clang version 5.0.0 (trunk 296467) (llvm/trunk 296476)"}85!1 = !{!2, !2, i64 0}86!2 = !{!"double", !3, i64 0}87!3 = !{!"omnipotent char", !4, i64 0}88!4 = !{!"Simple C/C++ TBAA"}89