1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc -mtriple=riscv64 -mattr=+v -riscv-v-vector-bits-min=128 < %s \
3; RUN:   | FileCheck %s
4
5@c = global [7 x i64] [i64 1, i64 2, i64 3, i64 4, i64 5, i64 6, i64 7], align 8
6
7define void @do.memmove() nounwind {
8; CHECK-LABEL: do.memmove:
9; CHECK:       # %bb.0: # %entry
10; CHECK-NEXT:    lui a0, %hi(c)
11; CHECK-NEXT:    addi a0, a0, %lo(c)
12; CHECK-NEXT:    vsetivli zero, 2, e64, m1, ta, mu
13; CHECK-NEXT:    vle64.v v8, (a0)
14; CHECK-NEXT:    addi a1, a0, 16
15; CHECK-NEXT:    vle64.v v9, (a1)
16; CHECK-NEXT:    addi a1, a0, 8
17; CHECK-NEXT:    vse64.v v8, (a1)
18; CHECK-NEXT:    addi a0, a0, 24
19; CHECK-NEXT:    vse64.v v9, (a0)
20; CHECK-NEXT:    ret
21entry:
22  ; this thing is "__builtin_memmove(&c[1], &c[0], sizeof(c[0]) * 4);"
23  tail call void @llvm.memmove.p0.p0.i64(
24        ptr noundef nonnull align 8 dereferenceable(32) getelementptr inbounds ([7 x i64], ptr @c, i64 0, i64 1),
25        ptr noundef nonnull align 8 dereferenceable(32) @c, i64 32, i1 false)
26  ret void
27}
28
29; Function Attrs: argmemonly mustprogress nofree nounwind willreturn
30declare void @llvm.memmove.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1 immarg) #1
31
32attributes #1 = { argmemonly mustprogress nofree nounwind willreturn }
33