File: legalize-memcpy-with-debug-info.mir

package info (click to toggle)
llvm-toolchain-11 1%3A11.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 995,808 kB
  • sloc: cpp: 4,767,656; ansic: 760,916; asm: 477,436; python: 170,940; objc: 69,804; lisp: 29,914; sh: 23,855; f90: 18,173; pascal: 7,551; perl: 7,471; ml: 5,603; awk: 3,489; makefile: 2,573; xml: 915; cs: 573; fortran: 503; javascript: 452
file content (59 lines) | stat: -rw-r--r-- 3,345 bytes parent folder | download | duplicates (2)
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
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -debugify-and-strip-all-safe=0 -mtriple=aarch64-- -run-pass=legalizer -verify-machineinstrs %s -o - | FileCheck %s -implicit-check-not=DBG_VALUE

--- |
  target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"

  define void @test_memcpy_tail() !dbg !11 {
  entry:
    call void @llvm.dbg.value(metadata i32 0, metadata !13, metadata !DIExpression()), !dbg !14
    unreachable, !dbg !14
  }

  ; Function Attrs: nounwind readnone speculatable willreturn
  declare void @llvm.dbg.value(metadata, metadata, metadata) #0

  attributes #0 = { nounwind readnone speculatable willreturn }

  !llvm.dbg.cu = !{!0}
  !llvm.debugify = !{!3, !3}
  !llvm.module.flags = !{!4}

  !0 = distinct !DICompileUnit(language: DW_LANG_C, file: !1, producer: "debugify", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
  !1 = !DIFile(filename: "/Users/vsk/src/llvm-backup-master/llvm/test/CodeGen/AArch64/GlobalISel/legalize-memcpy-et-al.mir", directory: "/")
  !2 = !{}
  !3 = !{i32 6}
  !4 = !{i32 2, !"Debug Info Version", i32 3}
  !6 = !DISubroutineType(types: !2)
  !9 = !DIBasicType(name: "ty32", size: 32, encoding: DW_ATE_unsigned)
  !11 = distinct !DISubprogram(name: "test_memcpy_tail", linkageName: "test_memcpy_tail", scope: null, file: !1, line: 2, type: !6, scopeLine: 2, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !12)
  !12 = !{!13}
  !13 = !DILocalVariable(name: "2", scope: !11, file: !1, line: 2, type: !9)
  !14 = !DILocation(line: 2, column: 1, scope: !11)

...
---
name:            test_memcpy_tail
body:             |
  bb.0:
    liveins: $w2, $x0, $x1

    ; CHECK-LABEL: name: test_memcpy_tail
    ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x0, debug-location !10
    ; CHECK: [[COPY1:%[0-9]+]]:_(p0) = COPY $x1, debug-location !DILocation(line: 3, column: 1, scope: !5)
    ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY $w2, debug-location !DILocation(line: 4, column: 1, scope: !5)
    ; CHECK: [[ZEXT:%[0-9]+]]:_(s64) = G_ZEXT [[COPY2]](s32), debug-location !DILocation(line: 5, column: 1, scope: !5)
    ; CHECK: $x0 = COPY [[COPY]](p0), debug-location !DILocation(line: 6, column: 1, scope: !5)
    ; CHECK: $x1 = COPY [[COPY1]](p0), debug-location !DILocation(line: 6, column: 1, scope: !5)
    ; CHECK: $x2 = COPY [[ZEXT]](s64), debug-location !DILocation(line: 6, column: 1, scope: !5)
    ; CHECK: TCRETURNdi &memcpy, 0, csr_aarch64_aapcs, implicit $sp, implicit $x0, implicit $x1, implicit $x2, debug-location !DILocation(line: 6, column: 1, scope: !5)
    %0:_(p0) = COPY $x0, debug-location !14
    %1:_(p0) = COPY $x1, debug-location !DILocation(line: 3, column: 1, scope: !11)
    %2:_(s32) = COPY $w2, debug-location !DILocation(line: 4, column: 1, scope: !11)
    %3:_(s64) = G_ZEXT %2(s32), debug-location !DILocation(line: 5, column: 1, scope: !11)
    G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.memcpy), %0(p0), %1(p0), %3(s64), 1, debug-location !DILocation(line: 6, column: 1, scope: !11)
    DBG_VALUE 0, $noreg, !13, !DIExpression(), debug-location !DILocation(line: 6, column: 1, scope: !11)
    DBG_VALUE 0, $noreg, !13, !DIExpression(), debug-location !DILocation(line: 6, column: 1, scope: !11)
    RET_ReallyLR debug-location !DILocation(line: 7, column: 1, scope: !11)

...