1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mcpu=core2 | FileCheck %s
4 declare void @llvm.memcpy.p0.p0.i64(ptr nocapture, ptr nocapture, i64, i1) nounwind
5 declare void @llvm.memcpy.inline.p0.p0.i64(ptr nocapture, ptr nocapture, i64, i1) nounwind
7 define void @test1(ptr %a, ptr %b) nounwind {
10 ; CHECK-NEXT: movq (%rsi), %rax
11 ; CHECK-NEXT: movq %rax, (%rdi)
13 tail call void @llvm.memcpy.inline.p0.p0.i64(ptr %a, ptr %b, i64 8, i1 0 )
17 define void @regular_memcpy_calls_external_function(ptr %a, ptr %b) nounwind {
18 ; CHECK-LABEL: regular_memcpy_calls_external_function:
20 ; CHECK-NEXT: movl $128, %edx
21 ; CHECK-NEXT: jmp memcpy@PLT # TAILCALL
22 tail call void @llvm.memcpy.p0.p0.i64(ptr %a, ptr %b, i64 128, i1 0 )
26 define void @inlined_copy_doesnt_call_external_function(ptr %a, ptr %b) nounwind {
27 ; CHECK-LABEL: inlined_copy_doesnt_call_external_function:
29 ; CHECK-NEXT: movl $128, %ecx
30 ; CHECK-NEXT: rep;movsb (%rsi), %es:(%rdi)
32 tail call void @llvm.memcpy.inline.p0.p0.i64(ptr %a, ptr %b, i64 128, i1 0 )