1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -debugify-and-strip-all-safe=0 -mtriple=aarch64-- -run-pass=legalizer -verify-machineinstrs %s -o - | FileCheck %s -implicit-check-not=DBG_VALUE
5 target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
7 define void @test_memcpy_tail() !dbg !11 {
9 call void @llvm.dbg.value(metadata i32 0, metadata !13, metadata !DIExpression()), !dbg !14
13 ; Function Attrs: nounwind readnone speculatable willreturn
14 declare void @llvm.dbg.value(metadata, metadata, metadata) #0
16 attributes #0 = { nounwind readnone speculatable willreturn }
19 !llvm.debugify = !{!3, !3}
20 !llvm.module.flags = !{!4}
22 !0 = distinct !DICompileUnit(language: DW_LANG_C, file: !1, producer: "debugify", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
23 !1 = !DIFile(filename: "/Users/vsk/src/llvm-backup-main/llvm/test/CodeGen/AArch64/GlobalISel/legalize-memcpy-et-al.mir", directory: "/")
26 !4 = !{i32 2, !"Debug Info Version", i32 3}
27 !6 = !DISubroutineType(types: !2)
28 !9 = !DIBasicType(name: "ty32", size: 32, encoding: DW_ATE_unsigned)
29 !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)
31 !13 = !DILocalVariable(name: "2", scope: !11, file: !1, line: 2, type: !9)
32 !14 = !DILocation(line: 2, column: 1, scope: !11)
36 name: test_memcpy_tail
39 liveins: $w2, $x0, $x1
41 ; CHECK-LABEL: name: test_memcpy_tail
42 ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x0, debug-location !10
43 ; CHECK: [[COPY1:%[0-9]+]]:_(p0) = COPY $x1, debug-location !DILocation(line: 3, column: 1, scope: !5)
44 ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY $w2, debug-location !DILocation(line: 4, column: 1, scope: !5)
45 ; CHECK: [[ZEXT:%[0-9]+]]:_(s64) = G_ZEXT [[COPY2]](s32), debug-location !DILocation(line: 5, column: 1, scope: !5)
46 ; CHECK: $x0 = COPY [[COPY]](p0), debug-location !DILocation(line: 6, column: 1, scope: !5)
47 ; CHECK: $x1 = COPY [[COPY1]](p0), debug-location !DILocation(line: 6, column: 1, scope: !5)
48 ; CHECK: $x2 = COPY [[ZEXT]](s64), debug-location !DILocation(line: 6, column: 1, scope: !5)
49 ; CHECK: TCRETURNdi &memcpy, 0, csr_aarch64_aapcs, implicit $sp, implicit $x0, implicit $x1, implicit $x2, debug-location !DILocation(line: 6, column: 1, scope: !5)
50 %0:_(p0) = COPY $x0, debug-location !14
51 %1:_(p0) = COPY $x1, debug-location !DILocation(line: 3, column: 1, scope: !11)
52 %2:_(s32) = COPY $w2, debug-location !DILocation(line: 4, column: 1, scope: !11)
53 %3:_(s64) = G_ZEXT %2(s32), debug-location !DILocation(line: 5, column: 1, scope: !11)
54 G_MEMCPY %0(p0), %1(p0), %3(s64), 1, debug-location !DILocation(line: 6, column: 1, scope: !11) :: (store unknown-size), (load unknown-size)
55 DBG_VALUE 0, $noreg, !13, !DIExpression(), debug-location !DILocation(line: 6, column: 1, scope: !11)
56 DBG_VALUE 0, $noreg, !13, !DIExpression(), debug-location !DILocation(line: 6, column: 1, scope: !11)
57 RET_ReallyLR debug-location !DILocation(line: 7, column: 1, scope: !11)