1 # RUN: llc -mtriple=x86_64-pc-linux -debug-entry-values -run-pass=unreachable-mbb-elimination -o - %s | FileCheck %s
3 # Verify that the call site information for the call residing in the eliminated
4 # block is removed. This test case would previously trigger an assertion when
5 # deleting the call instruction.
11 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
12 target triple = "x86_64-unknown-linux-gnu"
14 ; Function Attrs: nounwind uwtable
15 define i32 @main() !dbg !12 {
19 declare !dbg !4 void @foo()
22 !llvm.module.flags = !{!8, !9, !10}
25 !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 9.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !3, nameTableKind: None)
26 !1 = !DIFile(filename: "unreachable.c", directory: "/")
29 !4 = !DISubprogram(name: "foo", scope: !1, file: !1, line: 1, type: !5, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized, retainedNodes: !2)
30 !5 = !DISubroutineType(types: !6)
32 !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
33 !8 = !{i32 2, !"Dwarf Version", i32 4}
34 !9 = !{i32 2, !"Debug Info Version", i32 3}
35 !10 = !{i32 1, !"wchar_size", i32 4}
36 !11 = !{!"clang version 9.0.0"}
37 !12 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 3, type: !13, scopeLine: 3, flags: DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !2)
38 !13 = !DISubroutineType(types: !14)
40 !15 = distinct !DILexicalBlock(scope: !12, file: !1, line: 4, column: 7)
41 !16 = !DILocation(line: 4, column: 7, scope: !12)
42 !17 = !DILocation(line: 5, column: 5, scope: !15)
43 !18 = !DILocation(line: 6, column: 3, scope: !12)
48 tracksRegLiveness: true
50 - { bb: 1, offset: 0 }
53 successors: %bb.2(0x80000000)
55 frame-setup PUSH64r undef $rax, implicit-def $rsp, implicit $rsp
56 CFI_INSTRUCTION def_cfa_offset 16
57 JMP_1 %bb.2, debug-location !16
60 CALL64pcrel32 @foo, csr_64, implicit $rsp, implicit $ssp, implicit-def $rsp, implicit-def $ssp, debug-location !17
63 $eax = XOR32rr undef $eax, undef $eax, implicit-def dead $eflags, debug-location !18
64 $rcx = frame-destroy POP64r implicit-def $rsp, implicit $rsp, debug-location !18
65 CFI_INSTRUCTION def_cfa_offset 8, debug-location !18
66 RETQ killed $eax, debug-location !18