1 # RUN: llc -run-pass=aarch64-ldst-opt -mtriple=arm64-apple-iphoneos -aarch64-load-store-renaming=true -verify-machineinstrs -o - %s | FileCheck %s
3 define void @test_dbg_value1() #0 { ret void }
4 define void @test_dbg_value2() #0 { ret void }
6 !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "llvm", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
7 !1 = !DIFile(filename: "dbg.ll", directory: "/tmp")
9 !5 = distinct !DISubprogram(name: "test_dbg_value", scope: !1, file: !1, line: 1, type: !6, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2)
10 !6 = !DISubroutineType(types: !2)
11 !7 = !DILocalVariable(name: "x", arg: 1, scope: !5, file: !1, line: 1, type: !8)
12 !8 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
13 !9 = !DILocation(line: 1, column: 1, scope: !5)
14 !10 = !{i32 2, !"Debug Info Version", i32 3}
16 !llvm.module.flags = !{!10}
18 # Check we do not crash when checking $noreg debug operands.
20 # CHECK-LABEL: name: test_dbg_value1
22 # CHECK-NEXT: liveins: $x0, $x1
23 # CHECK: $x10, renamable $x8 = LDPXi renamable $x0, 0 :: (load (s64))
24 # CHECK-NEXT: renamable $x9 = LDRXui renamable $x0, 1 :: (load (s64))
25 # CHECK-NEXT: STRXui renamable $x9, renamable $x0, 100 :: (store (s64), align 4)
26 # CHECK-NEXT: DBG_VALUE $x9, $noreg
27 # CHECK-NEXT: renamable $x8 = ADDXrr $x8, $x8
28 # CHECK-NEXT: STPXi renamable $x8, killed $x10, renamable $x0, 10 :: (store (s64), align 4)
29 # CHECK-NEXT: RET undef $lr
32 tracksRegLiveness: true
40 machineFunctionInfo: {}
44 renamable $x9, renamable $x8 = LDPXi renamable $x0, 0 :: (load (s64))
45 STRXui renamable killed $x9, renamable $x0, 11 :: (store (s64), align 4)
46 renamable $x9 = LDRXui renamable $x0, 1 :: (load (s64))
47 STRXui renamable $x9, renamable $x0, 100 :: (store (s64), align 4)
48 DBG_VALUE $x9, $noreg, !7, !DIExpression(DW_OP_plus_uconst, 32), debug-location !9
49 renamable $x8 = ADDXrr $x8, $x8
50 STRXui renamable $x8, renamable $x0, 10 :: (store (s64), align 4)
55 # CHECK-LABEL: name: test_dbg_value2
57 # CHECK-NEXT: liveins: $x19, $x20, $x0
59 # CHECK: $x8 = ORRXrs $xzr, $x0, 0
60 # CHECK-NEXT: renamable $x0 = nuw ADDXri $x0, 8, 0
61 # CHECK-NEXT: DBG_VALUE $x0, $noreg,
62 # CHECK-NEXT: STRXui killed renamable $x8, renamable $x19, 2 :: (store (s64))
63 # CHECK-NEXT: $x8 = ADDXrs renamable $x0, killed renamable $x20, 0
64 # CHECK-NEXT: STPXi $xzr, renamable $x8, renamable $x19, 0 :: (store (s64))
65 # CHECK-NEXT: RET undef $lr, implicit $x0
68 tracksRegLiveness: true
75 machineFunctionInfo: {}
78 liveins: $x19, $x20, $x0
80 $x8 = ORRXrs $xzr, $x0, 0
81 renamable $x0 = nuw ADDXri $x0, 8, 0
82 DBG_VALUE $x0, $noreg, !7, !DIExpression(), debug-location !9
83 STRXui killed renamable $x8, renamable $x19, 2 :: (store (s64))
84 $x8 = ADDXrs renamable $x0, killed renamable $x20, 0
85 STRXui $xzr, renamable $x19, 0 :: (store (s64))
86 STRXui killed renamable $x8, killed renamable $x19, 1 :: (store (s64))
87 RET undef $lr, implicit $x0