File: pr39926.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 (45 lines) | stat: -rw-r--r-- 1,725 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
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mattr=avx | FileCheck %s
define i8 @test_offset(ptr %base) {
; CHECK-LABEL: test_offset:
; CHECK:       # %bb.0: # %entry
; CHECK-NEXT:    pushq %rax
; CHECK-NEXT:    .cfi_def_cfa_offset 16
; CHECK-NEXT:    movb $0, 7(%rdi)
; CHECK-NEXT:    movw $0, 5(%rdi)
; CHECK-NEXT:    movl $0, 1(%rdi)
; CHECK-NEXT:    movl -4(%rdi), %eax
; CHECK-NEXT:    movl %eax, -{{[0-9]+}}(%rsp)
; CHECK-NEXT:    movzbl (%rdi), %eax
; CHECK-NEXT:    movb %al, -{{[0-9]+}}(%rsp)
; CHECK-NEXT:    movl 1(%rdi), %eax
; CHECK-NEXT:    movl %eax, -{{[0-9]+}}(%rsp)
; CHECK-NEXT:    movzwl 5(%rdi), %eax
; CHECK-NEXT:    movw %ax, -{{[0-9]+}}(%rsp)
; CHECK-NEXT:    movzbl 7(%rdi), %eax
; CHECK-NEXT:    movb %al, -{{[0-9]+}}(%rsp)
; CHECK-NEXT:    movl 8(%rdi), %eax
; CHECK-NEXT:    movl %eax, -{{[0-9]+}}(%rsp)
; CHECK-NEXT:    movzbl -{{[0-9]+}}(%rsp), %eax
; CHECK-NEXT:    popq %rcx
; CHECK-NEXT:    .cfi_def_cfa_offset 8
; CHECK-NEXT:    retq
entry:
  %z = alloca [128 x i8], align 16
  %gep0 = getelementptr inbounds i8, ptr %base, i64 7
  store volatile i8 0, ptr %gep0
  %gep1 = getelementptr inbounds i8, ptr %base, i64 5
  store volatile i16 0, ptr %gep1
  %gep2 = getelementptr inbounds i8, ptr %base, i64 1
  store volatile i32 0, ptr %gep2

  %y1 = getelementptr inbounds i8, ptr %base, i64 -4
  call void @llvm.memcpy.p0.p0.i64(ptr %z, ptr %y1, i64 16, i1 false)

  %gep4 = getelementptr inbounds [128 x i8], ptr %z, i64 0, i64 4
  %ret = load i8, ptr %gep4
  ret i8 %ret
}

; Function Attrs: argmemonly nounwind
declare void @llvm.memcpy.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1)