xref: /aosp_15_r20/external/llvm/test/CodeGen/X86/small-byval-memcpy.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=core2 | FileCheck %s --check-prefix=CORE2
2*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=nehalem | FileCheck %s --check-prefix=NEHALEM
3*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=btver2 | FileCheck %s --check-prefix=BTVER2
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i32, i1)
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Workerdefine void @copy16bytes(i8* nocapture %a, i8* nocapture readonly %b) {
8*9880d681SAndroid Build Coastguard Worker  call void @llvm.memcpy.p0i8.p0i8.i64(i8* %a, i8* %b, i64 16, i32 1, i1 false)
9*9880d681SAndroid Build Coastguard Worker  ret void
10*9880d681SAndroid Build Coastguard Worker
11*9880d681SAndroid Build Coastguard Worker  ; CHECK-LABEL: copy16bytes
12*9880d681SAndroid Build Coastguard Worker  ; CORE2: movq
13*9880d681SAndroid Build Coastguard Worker  ; CORE2-NEXT: movq
14*9880d681SAndroid Build Coastguard Worker  ; CORE2-NEXT: movq
15*9880d681SAndroid Build Coastguard Worker  ; CORE2-NEXT: movq
16*9880d681SAndroid Build Coastguard Worker  ; CORE2-NEXT: retq
17*9880d681SAndroid Build Coastguard Worker
18*9880d681SAndroid Build Coastguard Worker  ; NEHALEM: movups
19*9880d681SAndroid Build Coastguard Worker  ; NEHALEM-NEXT: movups
20*9880d681SAndroid Build Coastguard Worker  ; NEHALEM-NEXT: retq
21*9880d681SAndroid Build Coastguard Worker
22*9880d681SAndroid Build Coastguard Worker  ; BTVER2: movups
23*9880d681SAndroid Build Coastguard Worker  ; BTVER2-NEXT: movups
24*9880d681SAndroid Build Coastguard Worker  ; BTVER2-NEXT: retq
25*9880d681SAndroid Build Coastguard Worker}
26