| ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --filter "call __bpf_trap|exit" --version 6 | |
| ; RUN: llc -mtriple=bpfel -mcpu=v3 -verify-machineinstrs < %s | FileCheck %s | |
| ; A trailing debug record must not hide a call to __bpf_trap from the | |
| ; pre-emit pass that adds the required exit instruction. | |
| target triple = "bpfel" | |
| declare void @llvm.trap() #1 | |
| define dso_local void @terminal_trap() #0 !dbg !4 { | |
| ; CHECK-LABEL: terminal_trap: | |
| ; CHECK: call __bpf_trap | |
| ; CHECK: exit | |
| entry: | |
| call void @llvm.trap(), !dbg !8 | |
| #dbg_value(i32 7, !10, !DIExpression(), !9) | |
| unreachable, !dbg !9 | |
| } | |
| attributes #0 = { noinline nounwind } | |
| attributes #1 = { cold noreturn nounwind } | |
| !llvm.dbg.cu = !{!0} | |
| !llvm.module.flags = !{!2, !3} | |
| !0 = distinct !DICompileUnit(language: DW_LANG_C11, file: !1, producer: "llvm", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug) | |
| !1 = !DIFile(filename: "trap-debug-value.c", directory: "/") | |
| !2 = !{i32 7, !"Dwarf Version", i32 5} | |
| !3 = !{i32 2, !"Debug Info Version", i32 3} | |
| !4 = distinct !DISubprogram(name: "terminal_trap", scope: !1, file: !1, line: 1, type: !5, scopeLine: 1, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !11) | |
| !5 = !DISubroutineType(types: !6) | |
| !6 = !{null} | |
| !8 = !DILocation(line: 2, column: 3, scope: !4) | |
| !9 = !DILocation(line: 3, column: 1, scope: !4) | |
| !10 = !DILocalVariable(name: "tail_value", scope: !4, file: !1, line: 1, type: !12) | |
| !11 = !{!10} | |
| !12 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) |