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_mov_b32 s16, s33
17 ; CHECK-NEXT: s_mov_b32 s33, s32
18 ; CHECK-NEXT: s_or_saveexec_b64 s[18:19], -1
19 ; CHECK-NEXT: buffer_store_dword v40, off, s[0:3], s33 ; 4-byte Folded Spill
20 ; CHECK-NEXT: s_mov_b64 exec, s[18:19]
21 ; CHECK-NEXT: v_writelane_b32 v40, s16, 2
22 ; CHECK-NEXT: s_add_i32 s32, s32, 0x400
23 ; CHECK-NEXT: v_writelane_b32 v40, s30, 0
24 ; CHECK-NEXT: v_writelane_b32 v40, s31, 1
26 ; CHECK-NEXT: .loc 0 31 3 prologue_end ; lane-info.cpp:31:3
27 ; CHECK-NEXT: s_getpc_b64 s[16:17]
28 ; CHECK-NEXT: s_add_u32 s16, s16, _ZL13sleep_foreverv@gotpcrel32@lo+4
29 ; CHECK-NEXT: s_addc_u32 s17, s17, _ZL13sleep_foreverv@gotpcrel32@hi+12
30 ; CHECK-NEXT: s_load_dwordx2 s[16:17], s[16:17], 0x0
31 ; CHECK-NEXT: s_mov_b64 s[22:23], s[2:3]
32 ; CHECK-NEXT: s_mov_b64 s[20:21], s[0:1]
33 ; CHECK-NEXT: s_mov_b64 s[0:1], s[20:21]
34 ; CHECK-NEXT: s_mov_b64 s[2:3], s[22:23]
35 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
36 ; CHECK-NEXT: s_swappc_b64 s[30:31], s[16:17]
38 ; CHECK-NEXT: .loc 0 32 1 ; lane-info.cpp:32:1
39 ; CHECK-NEXT: v_readlane_b32 s31, v40, 1
40 ; CHECK-NEXT: v_readlane_b32 s30, v40, 0
41 ; CHECK-NEXT: v_readlane_b32 s4, v40, 2
42 ; CHECK-NEXT: s_or_saveexec_b64 s[6:7], -1
43 ; CHECK-NEXT: buffer_load_dword v40, off, s[0:3], s33 ; 4-byte Folded Reload
44 ; CHECK-NEXT: s_mov_b64 exec, s[6:7]
45 ; CHECK-NEXT: .loc 0 32 1 epilogue_begin is_stmt 0 ; lane-info.cpp:32:1
46 ; CHECK-NEXT: s_add_i32 s32, s32, 0xfffffc00
47 ; CHECK-NEXT: s_mov_b32 s33, s4
48 ; CHECK-NEXT: s_waitcnt vmcnt(0)
49 ; CHECK-NEXT: s_setpc_b64 s[30:31]
52 call void @_ZL13sleep_foreverv(), !dbg !1646
56 ; Function Attrs: convergent nounwind
57 declare void @_ZL13sleep_foreverv() #0
59 attributes #0 = { nounwind "frame-pointer"="all" }
62 !llvm.module.flags = !{!1638, !1639, !1640, !1641}
63 !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)
64 !1 = !DIFile(filename: "lane-info.cpp", directory: "/tmp", checksumkind: CSK_MD5, checksum: "4ab9b75a30baffdf0f6f536a80e3e382")
65 !371 = !DISubroutineType(types: !372)
67 !1638 = !{i32 7, !"Dwarf Version", i32 5}
68 !1639 = !{i32 2, !"Debug Info Version", i32 3}
69 !1640 = !{i32 1, !"wchar_size", i32 4}
70 !1641 = !{i32 7, !"PIC Level", i32 1}
71 !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)
73 !1646 = !DILocation(line: 31, column: 3, scope: !1644)
74 !1647 = !DILocation(line: 32, column: 1, scope: !1644)