1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc --mtriple=loongarch64 -mattr=+d < %s | FileCheck %s
6 define void @box(ptr noalias nocapture noundef writeonly sret(%Box) align 16 dereferenceable(48) %b, i64 %i) {
9 ; CHECK-NEXT: addi.d $sp, $sp, -96
10 ; CHECK-NEXT: .cfi_def_cfa_offset 96
11 ; CHECK-NEXT: slli.d $a2, $a1, 5
12 ; CHECK-NEXT: alsl.d $a1, $a1, $a2, 4
13 ; CHECK-NEXT: addi.d $a2, $sp, 0
14 ; CHECK-NEXT: add.d $a3, $a2, $a1
15 ; CHECK-NEXT: vldx $vr0, $a1, $a2
16 ; CHECK-NEXT: vld $vr1, $a3, 32
17 ; CHECK-NEXT: vld $vr2, $a3, 16
18 ; CHECK-NEXT: vst $vr0, $a0, 0
19 ; CHECK-NEXT: vst $vr1, $a0, 32
20 ; CHECK-NEXT: vst $vr2, $a0, 16
21 ; CHECK-NEXT: addi.d $sp, $sp, 96
23 %1 = alloca [2 x %Box], align 16
24 %2 = getelementptr inbounds [2 x %Box], ptr %1, i64 0, i64 %i
25 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(48) %b, ptr noundef nonnull align 16 dereferenceable(48) %2, i64 48, i1 false)