1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu | FileCheck %s
5 declare void @llvm.memcpy.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1 immarg) #1
6 define dso_local void @copy_7_bytes(ptr noalias nocapture, ptr noalias nocapture readonly) nounwind #0 {
7 ; CHECK-LABEL: copy_7_bytes:
9 ; CHECK-NEXT: movl (%rsi), %eax
10 ; CHECK-NEXT: movl 3(%rsi), %ecx
11 ; CHECK-NEXT: movl %ecx, 3(%rdi)
12 ; CHECK-NEXT: movl %eax, (%rdi)
14 tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %0, ptr align 1 %1, i64 7, i1 false)
17 define dso_local void @copy_7_bytes_volatile(ptr noalias nocapture, ptr noalias nocapture readonly) nounwind #0 {
18 ; CHECK-LABEL: copy_7_bytes_volatile:
20 ; CHECK-NEXT: movzbl 6(%rsi), %eax
21 ; CHECK-NEXT: movb %al, 6(%rdi)
22 ; CHECK-NEXT: movzwl 4(%rsi), %eax
23 ; CHECK-NEXT: movw %ax, 4(%rdi)
24 ; CHECK-NEXT: movl (%rsi), %eax
25 ; CHECK-NEXT: movl %eax, (%rdi)
27 tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %0, ptr align 1 %1, i64 7, i1 true)
32 declare void @llvm.memmove.p0.p0.i64(ptr nocapture, ptr nocapture readonly, i64, i1 immarg) #1
33 define dso_local void @move_7_bytes(ptr nocapture, ptr nocapture readonly) nounwind #0 {
34 ; CHECK-LABEL: move_7_bytes:
36 ; CHECK-NEXT: movl (%rsi), %eax
37 ; CHECK-NEXT: movzwl 4(%rsi), %ecx
38 ; CHECK-NEXT: movzbl 6(%rsi), %edx
39 ; CHECK-NEXT: movb %dl, 6(%rdi)
40 ; CHECK-NEXT: movw %cx, 4(%rdi)
41 ; CHECK-NEXT: movl %eax, (%rdi)
43 tail call void @llvm.memmove.p0.p0.i64(ptr align 1 %0, ptr align 1 %1, i64 7, i1 false)
46 define dso_local void @move_7_bytes_volatile(ptr nocapture, ptr nocapture readonly) nounwind #0 {
47 ; CHECK-LABEL: move_7_bytes_volatile:
49 ; CHECK-NEXT: movl (%rsi), %eax
50 ; CHECK-NEXT: movzwl 4(%rsi), %ecx
51 ; CHECK-NEXT: movzbl 6(%rsi), %edx
52 ; CHECK-NEXT: movb %dl, 6(%rdi)
53 ; CHECK-NEXT: movw %cx, 4(%rdi)
54 ; CHECK-NEXT: movl %eax, (%rdi)
56 tail call void @llvm.memmove.p0.p0.i64(ptr align 1 %0, ptr align 1 %1, i64 7, i1 true)
61 declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8 , i64, i1 immarg) #1
62 define dso_local void @set_7_bytes(ptr noalias nocapture) nounwind #0 {
63 ; CHECK-LABEL: set_7_bytes:
65 ; CHECK-NEXT: movl $16843009, 3(%rdi) # imm = 0x1010101
66 ; CHECK-NEXT: movl $16843009, (%rdi) # imm = 0x1010101
68 tail call void @llvm.memset.p0.i64(ptr align 1 %0, i8 1, i64 7, i1 false)
71 define dso_local void @set_7_bytes_volatile(ptr noalias nocapture) nounwind #0 {
72 ; CHECK-LABEL: set_7_bytes_volatile:
74 ; CHECK-NEXT: movb $1, 6(%rdi)
75 ; CHECK-NEXT: movw $257, 4(%rdi) # imm = 0x101
76 ; CHECK-NEXT: movl $16843009, (%rdi) # imm = 0x1010101
78 tail call void @llvm.memset.p0.i64(ptr align 1 %0, i8 1, i64 7, i1 true)
82 attributes #0 = { noreturn nounwind uwtable "target-cpu"="x86-64" }
83 attributes #1 = { argmemonly nounwind }