File: wrong-chain-fixed-load.ll

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 1,998,492 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (31 lines) | stat: -rw-r--r-- 1,263 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -mtriple=riscv64 -mattr=+v < %s | FileCheck %s

@c = global [7 x i64] [i64 1, i64 2, i64 3, i64 4, i64 5, i64 6, i64 7], align 8

define void @do.memmove() nounwind {
; CHECK-LABEL: do.memmove:
; CHECK:       # %bb.0: # %entry
; CHECK-NEXT:    lui a0, %hi(c)
; CHECK-NEXT:    addi a0, a0, %lo(c)
; CHECK-NEXT:    addi a1, a0, 16
; CHECK-NEXT:    vsetivli zero, 2, e64, m1, ta, ma
; CHECK-NEXT:    vle64.v v8, (a1)
; CHECK-NEXT:    addi a1, a0, 24
; CHECK-NEXT:    vse64.v v8, (a1)
; CHECK-NEXT:    vle64.v v8, (a0)
; CHECK-NEXT:    addi a0, a0, 8
; CHECK-NEXT:    vse64.v v8, (a0)
; CHECK-NEXT:    ret
entry:
  ; this thing is "__builtin_memmove(&c[1], &c[0], sizeof(c[0]) * 4);"
  tail call void @llvm.memmove.p0.p0.i64(
        ptr noundef nonnull align 8 dereferenceable(32) getelementptr inbounds ([7 x i64], ptr @c, i64 0, i64 1),
        ptr noundef nonnull align 8 dereferenceable(32) @c, i64 32, i1 false)
  ret void
}

; Function Attrs: argmemonly mustprogress nofree nounwind willreturn
declare void @llvm.memmove.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1 immarg) #1

attributes #1 = { argmemonly mustprogress nofree nounwind willreturn }