1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -global-isel -mtriple=arm64-linux-gnu -global-isel-abort=1 | FileCheck %s
3 target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
4 target triple = "arm64-apple-ios9.0.0"
6 ; Check we don't fall back due to hitting a DBG_VALUE with a deleted vreg.
8 %0 = type { %1, %3, %5, %8, i8, i32, i8, i64, [4096 x %9], i64, i64, [4096 x %11], i64, i64, %13, %21, ptr, %35, i64, [504 x i8] }
9 %1 = type { [32 x %2] }
10 %2 = type { i32, i32 }
11 %3 = type { [32 x %4] }
12 %4 = type { i64, i64 }
13 %5 = type { [32 x %6] }
15 %7 = type { i8, [64 x i8] }
16 %8 = type { [1024 x %7], %7 }
17 %9 = type { ptr, i64 }
18 %10 = type { ptr, ptr, i8, i8 }
19 %11 = type { ptr, ptr }
20 %12 = type { i64, i64 }
22 %14 = type { ptr, %17, %19 }
24 %16 = type <{ %15, ptr, ptr, i8, [7 x i8] }>
30 %22 = type <{ %23, %30, %32, %33, [4 x i8] }>
32 %24 = type { %25, %27 }
43 %35 = type { [1024 x i64] }
45 @global = external hidden global %0, align 512
47 define void @baz(ptr %arg) !dbg !6 {
49 ; CHECK: .Lfunc_begin0:
50 ; CHECK-NEXT: .cfi_startproc
51 ; CHECK-NEXT: // %bb.0: // %bb
52 ; CHECK-NEXT: //DEBUG_VALUE: baz:3 <- undef
53 ; CHECK-NEXT: .file 1 "/" "tmp.ll"
54 ; CHECK-NEXT: .loc 1 4 1 prologue_end // tmp.ll:4:1
55 ; CHECK-NEXT: lsl x8, x0, #4
56 ; CHECK-NEXT: adrp x9, global+202752
57 ; CHECK-NEXT: add x9, x9, :lo12:global+202752
58 ; CHECK-NEXT: and x8, x8, #0x1ff0
59 ; CHECK-NEXT: .loc 1 5 1 // tmp.ll:5:1
60 ; CHECK-NEXT: str xzr, [x9, x8]
61 ; CHECK-NEXT: .loc 1 6 1 // tmp.ll:6:1
65 %tmp = ptrtoint ptr %arg to i64, !dbg !14
66 %tmp1 = shl i64 %tmp, 1, !dbg !15
67 %tmp2 = and i64 %tmp1, 1022, !dbg !16
68 call void @llvm.dbg.value(metadata i64 %tmp2, metadata !12, metadata !DIExpression()), !dbg !16
69 %tmp3 = getelementptr inbounds %0, ptr @global, i64 0, i32 17, i32 0, i64 %tmp2, !dbg !17
70 store i64 0, ptr %tmp3, align 16, !dbg !18
74 ; Function Attrs: nofree nosync nounwind readnone speculatable willreturn
75 declare void @llvm.dbg.value(metadata, metadata, metadata) #1
77 attributes #1 = { nofree nosync nounwind readnone speculatable willreturn }
79 !llvm.module.flags = !{!0}
81 !llvm.debugify = !{!4, !5}
83 !0 = !{i32 2, !"Debug Info Version", i32 3}
84 !1 = distinct !DICompileUnit(language: DW_LANG_C, file: !2, producer: "debugify", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !3)
85 !2 = !DIFile(filename: "tmp.ll", directory: "/")
89 !6 = distinct !DISubprogram(name: "baz", linkageName: "baz", scope: null, file: !2, line: 1, type: !7, scopeLine: 1, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !1, retainedNodes: !8)
90 !7 = !DISubroutineType(types: !3)
91 !8 = !{!9, !11, !12, !13}
92 !9 = !DILocalVariable(name: "1", scope: !6, file: !2, line: 1, type: !10)
93 !10 = !DIBasicType(name: "ty64", size: 64, encoding: DW_ATE_unsigned)
94 !11 = !DILocalVariable(name: "2", scope: !6, file: !2, line: 2, type: !10)
95 !12 = !DILocalVariable(name: "3", scope: !6, file: !2, line: 3, type: !10)
96 !13 = !DILocalVariable(name: "4", scope: !6, file: !2, line: 4, type: !10)
97 !14 = !DILocation(line: 1, column: 1, scope: !6)
98 !15 = !DILocation(line: 2, column: 1, scope: !6)
99 !16 = !DILocation(line: 3, column: 1, scope: !6)
100 !17 = !DILocation(line: 4, column: 1, scope: !6)
101 !18 = !DILocation(line: 5, column: 1, scope: !6)
102 !19 = !DILocation(line: 6, column: 1, scope: !6)