1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx906 -O0 -verify-machineinstrs < %s | FileCheck %s
4 ; Test that source locations (.loc directives) are not added to the code within the prologue.
6 ; Function Attrs: convergent mustprogress nounwind
7 define hidden void @_ZL3barv() #0 !dbg !1644 {
8 ; CHECK-LABEL: _ZL3barv:
9 ; CHECK: .Lfunc_begin0:
10 ; CHECK-NEXT: .file 0 "/tmp" "lane-info.cpp" md5 0x4ab9b75a30baffdf0f6f536a80e3e382
11 ; CHECK-NEXT: .loc 0 30 0 ; lane-info.cpp:30:0
12 ; CHECK-NEXT: .cfi_sections .debug_frame
13 ; CHECK-NEXT: .cfi_startproc
14 ; CHECK-NEXT: ; %bb.0: ; %entry
15 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
16 ; CHECK-NEXT: s_or_saveexec_b64 s[16:17], -1
17 ; CHECK-NEXT: buffer_store_dword v40, off, s[0:3], s32 ; 4-byte Folded Spill
18 ; CHECK-NEXT: s_mov_b64 exec, s[16:17]
19 ; CHECK-NEXT: v_writelane_b32 v40, s33, 2
20 ; CHECK-NEXT: s_mov_b32 s33, s32
21 ; CHECK-NEXT: s_add_i32 s32, s32, 0x400
22 ; CHECK-NEXT: v_writelane_b32 v40, s30, 0
23 ; CHECK-NEXT: v_writelane_b32 v40, s31, 1
25 ; CHECK-NEXT: .loc 0 31 3 prologue_end ; lane-info.cpp:31:3
26 ; CHECK-NEXT: s_getpc_b64 s[16:17]
27 ; CHECK-NEXT: s_add_u32 s16, s16, _ZL13sleep_foreverv@gotpcrel32@lo+4
28 ; CHECK-NEXT: s_addc_u32 s17, s17, _ZL13sleep_foreverv@gotpcrel32@hi+12
29 ; CHECK-NEXT: s_load_dwordx2 s[16:17], s[16:17], 0x0
30 ; CHECK-NEXT: s_mov_b64 s[22:23], s[2:3]
31 ; CHECK-NEXT: s_mov_b64 s[20:21], s[0:1]
32 ; CHECK-NEXT: s_mov_b64 s[0:1], s[20:21]
33 ; CHECK-NEXT: s_mov_b64 s[2:3], s[22:23]
34 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
35 ; CHECK-NEXT: s_swappc_b64 s[30:31], s[16:17]
37 ; CHECK-NEXT: .loc 0 32 1 ; lane-info.cpp:32:1
38 ; CHECK-NEXT: v_readlane_b32 s31, v40, 1
39 ; CHECK-NEXT: v_readlane_b32 s30, v40, 0
40 ; CHECK-NEXT: s_add_i32 s32, s32, 0xfffffc00
41 ; CHECK-NEXT: v_readlane_b32 s33, v40, 2
42 ; CHECK-NEXT: s_or_saveexec_b64 s[4:5], -1
43 ; CHECK-NEXT: buffer_load_dword v40, off, s[0:3], s32 ; 4-byte Folded Reload
44 ; CHECK-NEXT: s_mov_b64 exec, s[4:5]
45 ; CHECK-NEXT: s_waitcnt vmcnt(0)
46 ; CHECK-NEXT: s_setpc_b64 s[30:31]
49 call void @_ZL13sleep_foreverv(), !dbg !1646
53 ; Function Attrs: convergent nounwind
54 declare void @_ZL13sleep_foreverv() #0
56 attributes #0 = { nounwind "frame-pointer"="all" }
59 !llvm.module.flags = !{!1638, !1639, !1640, !1641}
60 !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_11, file: !1, producer: "clang version 13.0.0)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None)
61 !1 = !DIFile(filename: "lane-info.cpp", directory: "/tmp", checksumkind: CSK_MD5, checksum: "4ab9b75a30baffdf0f6f536a80e3e382")
62 !371 = !DISubroutineType(types: !372)
64 !1638 = !{i32 7, !"Dwarf Version", i32 5}
65 !1639 = !{i32 2, !"Debug Info Version", i32 3}
66 !1640 = !{i32 1, !"wchar_size", i32 4}
67 !1641 = !{i32 7, !"PIC Level", i32 1}
68 !1644 = distinct !DISubprogram(name: "bar", linkageName: "_ZL3barv", scope: !1, file: !1, line: 29, type: !371, scopeLine: 30, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !1645)
70 !1646 = !DILocation(line: 31, column: 3, scope: !1644)
71 !1647 = !DILocation(line: 32, column: 1, scope: !1644)