File: volatile-memstores-nooverlapping-load-stores.ll

package info (click to toggle)
llvm-toolchain-17 1%3A17.0.6-22
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,799,624 kB
  • sloc: cpp: 6,428,607; ansic: 1,383,196; asm: 793,408; python: 223,504; objc: 75,364; f90: 60,502; lisp: 33,869; pascal: 15,282; sh: 9,684; perl: 7,453; ml: 4,937; awk: 3,523; makefile: 2,889; javascript: 2,149; xml: 888; fortran: 619; cs: 573
file content (83 lines) | stat: -rw-r--r-- 3,207 bytes parent folder | download | duplicates (13)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu | FileCheck %s


declare void @llvm.memcpy.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1 immarg) #1
define dso_local void @copy_7_bytes(ptr noalias nocapture, ptr noalias nocapture readonly) nounwind #0 {
; CHECK-LABEL: copy_7_bytes:
; CHECK:       # %bb.0:
; CHECK-NEXT:    movl (%rsi), %eax
; CHECK-NEXT:    movl 3(%rsi), %ecx
; CHECK-NEXT:    movl %ecx, 3(%rdi)
; CHECK-NEXT:    movl %eax, (%rdi)
; CHECK-NEXT:    retq
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %0, ptr align 1 %1, i64 7, i1 false)
  ret void
}
define dso_local void @copy_7_bytes_volatile(ptr noalias nocapture, ptr noalias nocapture readonly) nounwind #0 {
; CHECK-LABEL: copy_7_bytes_volatile:
; CHECK:       # %bb.0:
; CHECK-NEXT:    movzbl 6(%rsi), %eax
; CHECK-NEXT:    movb %al, 6(%rdi)
; CHECK-NEXT:    movzwl 4(%rsi), %eax
; CHECK-NEXT:    movw %ax, 4(%rdi)
; CHECK-NEXT:    movl (%rsi), %eax
; CHECK-NEXT:    movl %eax, (%rdi)
; CHECK-NEXT:    retq
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %0, ptr align 1 %1, i64 7, i1 true)
  ret void
}


declare void @llvm.memmove.p0.p0.i64(ptr nocapture, ptr nocapture readonly, i64, i1 immarg) #1
define dso_local void @move_7_bytes(ptr nocapture, ptr nocapture readonly) nounwind #0 {
; CHECK-LABEL: move_7_bytes:
; CHECK:       # %bb.0:
; CHECK-NEXT:    movl (%rsi), %eax
; CHECK-NEXT:    movzwl 4(%rsi), %ecx
; CHECK-NEXT:    movzbl 6(%rsi), %edx
; CHECK-NEXT:    movb %dl, 6(%rdi)
; CHECK-NEXT:    movw %cx, 4(%rdi)
; CHECK-NEXT:    movl %eax, (%rdi)
; CHECK-NEXT:    retq
  tail call void @llvm.memmove.p0.p0.i64(ptr align 1 %0, ptr align 1 %1, i64 7, i1 false)
  ret void
}
define dso_local void @move_7_bytes_volatile(ptr nocapture, ptr nocapture readonly) nounwind #0 {
; CHECK-LABEL: move_7_bytes_volatile:
; CHECK:       # %bb.0:
; CHECK-NEXT:    movl (%rsi), %eax
; CHECK-NEXT:    movzwl 4(%rsi), %ecx
; CHECK-NEXT:    movzbl 6(%rsi), %edx
; CHECK-NEXT:    movb %dl, 6(%rdi)
; CHECK-NEXT:    movw %cx, 4(%rdi)
; CHECK-NEXT:    movl %eax, (%rdi)
; CHECK-NEXT:    retq
  tail call void @llvm.memmove.p0.p0.i64(ptr align 1 %0, ptr align 1 %1, i64 7, i1 true)
  ret void
}


declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8 , i64, i1 immarg) #1
define dso_local void @set_7_bytes(ptr noalias nocapture) nounwind #0 {
; CHECK-LABEL: set_7_bytes:
; CHECK:       # %bb.0:
; CHECK-NEXT:    movl $16843009, 3(%rdi) # imm = 0x1010101
; CHECK-NEXT:    movl $16843009, (%rdi) # imm = 0x1010101
; CHECK-NEXT:    retq
  tail call void @llvm.memset.p0.i64(ptr align 1 %0, i8 1, i64 7, i1 false)
  ret void
}
define dso_local void @set_7_bytes_volatile(ptr noalias nocapture) nounwind #0 {
; CHECK-LABEL: set_7_bytes_volatile:
; CHECK:       # %bb.0:
; CHECK-NEXT:    movb $1, 6(%rdi)
; CHECK-NEXT:    movw $257, 4(%rdi) # imm = 0x101
; CHECK-NEXT:    movl $16843009, (%rdi) # imm = 0x1010101
; CHECK-NEXT:    retq
  tail call void @llvm.memset.p0.i64(ptr align 1 %0, i8 1, i64 7, i1 true)
  ret void
}

attributes #0 = { noreturn nounwind uwtable "target-cpu"="x86-64" }
attributes #1 = { argmemonly nounwind }