70 lines · plain
1# RUN: llc -emit-call-site-info -mtriple=x86_64-pc-linux -run-pass=unreachable-mbb-elimination -o - %s | FileCheck %s2# RUN: llc -emit-call-site-info -mtriple=x86_64-pc-linux -passes=unreachable-mbb-elimination -o - %s | FileCheck %s3 4# Verify that the call site information for the call residing in the eliminated5# block is removed. This test case would previously trigger an assertion when6# deleting the call instruction.7 8# CHECK: name: main9# CHECK: callSites: []10 11--- |12 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"13 target triple = "x86_64-unknown-linux-gnu"14 15 ; Function Attrs: nounwind uwtable16 define i32 @main() !dbg !12 {17 unreachable18 }19 20 declare !dbg !4 void @foo()21 22 !llvm.dbg.cu = !{!0}23 !llvm.module.flags = !{!8, !9, !10}24 !llvm.ident = !{!11}25 26 !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)27 !1 = !DIFile(filename: "unreachable.c", directory: "/")28 !2 = !{}29 !3 = !{!4}30 !4 = !DISubprogram(name: "foo", scope: !1, file: !1, line: 1, type: !5, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized, retainedNodes: !2)31 !5 = !DISubroutineType(types: !6)32 !6 = !{null}33 !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)34 !8 = !{i32 2, !"Dwarf Version", i32 4}35 !9 = !{i32 2, !"Debug Info Version", i32 3}36 !10 = !{i32 1, !"wchar_size", i32 4}37 !11 = !{!"clang version 9.0.0"}38 !12 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 3, type: !13, scopeLine: 3, flags: DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !2)39 !13 = !DISubroutineType(types: !14)40 !14 = !{!7}41 !15 = distinct !DILexicalBlock(scope: !12, file: !1, line: 4, column: 7)42 !16 = !DILocation(line: 4, column: 7, scope: !12)43 !17 = !DILocation(line: 5, column: 5, scope: !15)44 !18 = !DILocation(line: 6, column: 3, scope: !12)45 46...47---48name: main49tracksRegLiveness: true50callSites:51 - { bb: 1, offset: 0 }52body: |53 bb.0:54 successors: %bb.2(0x80000000)55 56 frame-setup PUSH64r undef $rax, implicit-def $rsp, implicit $rsp57 CFI_INSTRUCTION def_cfa_offset 1658 JMP_1 %bb.2, debug-location !1659 60 bb.1:61 CALL64pcrel32 @foo, csr_64, implicit $rsp, implicit $ssp, implicit-def $rsp, implicit-def $ssp, debug-location !1762 63 bb.2:64 $eax = XOR32rr undef $eax, undef $eax, implicit-def dead $eflags, debug-location !1865 $rcx = frame-destroy POP64r implicit-def $rsp, implicit $rsp, debug-location !1866 CFI_INSTRUCTION def_cfa_offset 8, debug-location !1867 RET64 killed $eax, debug-location !1868 69...70