xref: /aosp_15_r20/external/llvm/test/CodeGen/AArch64/arm64-misaligned-memcpy-inline.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc -mtriple=arm64-apple-ios -mattr=+strict-align < %s | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker; Small (16-bytes here) unaligned memcpys should stay memcpy calls if
4*9880d681SAndroid Build Coastguard Worker; strict-alignment is turned on.
5*9880d681SAndroid Build Coastguard Workerdefine void @t0(i8* %out, i8* %in) {
6*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: t0:
7*9880d681SAndroid Build Coastguard Worker; CHECK:         orr w2, wzr, #0x10
8*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT:    bl _memcpy
9*9880d681SAndroid Build Coastguard Workerentry:
10*9880d681SAndroid Build Coastguard Worker  call void @llvm.memcpy.p0i8.p0i8.i64(i8* %out, i8* %in, i64 16, i32 1, i1 false)
11*9880d681SAndroid Build Coastguard Worker  ret void
12*9880d681SAndroid Build Coastguard Worker}
13*9880d681SAndroid Build Coastguard Worker
14*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i32, i1)
15