1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx906 -verify-machineinstrs -run-pass=machine-scheduler -o - %s | FileCheck %s
3 # The DBG_VALUE in bb.5 ends a scheduling region, and its uses should
4 # not be tracked like a normal instruction.
7 define void @dbg_value_ends_sched_region() {
12 !llvm.module.flags = !{!3, !4}
14 !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 12.0.0 (/src/external/llvm-project/clang ff12a3768d17240b01cbe9957e3c9e8f8ffe9854)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !2, splitDebugInlining: false, nameTableKind: None)
15 !1 = !DIFile(filename: "/tmp/comgr-054202/input/CompileSource", directory: "/home/matt/bugs/SWDEV-253507")
17 !3 = !{i32 2, !"Debug Info Version", i32 3}
18 !4 = !{i32 7, !"PIC Level", i32 1}
19 !5 = !{!6, !9, i64 68}
20 !6 = !{!"ShaderData", !7, i64 0, !7, i64 16, !7, i64 32, !7, i64 48, !9, i64 64, !9, i64 68, !9, i64 72, !9, i64 76, !9, i64 80, !10, i64 84, !10, i64 88, !9, i64 92, !9, i64 96, !10, i64 100, !10, i64 104, !11, i64 112, !11, i64 144, !12, i64 176, !12, i64 184, !7, i64 192, !7, i64 208, !7, i64 224, !11, i64 240, !9, i64 272, !9, i64 276, !9, i64 280, !10, i64 284, !7, i64 288, !7, i64 304, !7, i64 320, !7, i64 336}
21 !7 = !{!"omnipotent char", !8, i64 0}
22 !8 = !{!"Simple C/C++ TBAA"}
23 !9 = !{!"int", !7, i64 0}
24 !10 = !{!"float", !7, i64 0}
25 !11 = !{!"differential3", !7, i64 0, !7, i64 16}
26 !12 = !{!"differential", !10, i64 0, !10, i64 4}
27 !13 = !{!6, !9, i64 280}
28 !16 = !DILocalVariable(name: "data", scope: !17, file: !18, line: 24)
29 !17 = distinct !DISubprogram(name: "svm_node_geometry", scope: !18, file: !18, line: 21, type: !19, scopeLine: 23, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !2)
30 !18 = !DIFile(filename: "source/kernel/svm/svm_geometry.h", directory: "/home/matt/bugs/SWDEV-253507")
31 !19 = !DISubroutineType(types: !20)
33 !21 = !DILocation(line: 0, scope: !17)
37 name: dbg_value_ends_sched_region
38 tracksRegLiveness: true
40 scratchRSrcReg: '$sgpr0_sgpr1_sgpr2_sgpr3'
41 frameOffsetReg: '$sgpr33'
42 stackPtrOffsetReg: '$sgpr32'
44 ; CHECK-LABEL: name: dbg_value_ends_sched_region
46 ; CHECK: successors: %bb.1(0x80000000)
47 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
48 ; CHECK: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
49 ; CHECK: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
50 ; CHECK: [[DEF:%[0-9]+]]:vreg_64 = IMPLICIT_DEF
51 ; CHECK: [[DEF1:%[0-9]+]]:vreg_64 = IMPLICIT_DEF
52 ; CHECK: [[DEF2:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
53 ; CHECK: [[DEF3:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
54 ; CHECK: [[DEF4:%[0-9]+]]:vreg_64 = IMPLICIT_DEF
55 ; CHECK: [[DEF5:%[0-9]+]]:vreg_64 = IMPLICIT_DEF
56 ; CHECK: [[DEF6:%[0-9]+]]:vreg_64 = IMPLICIT_DEF
57 ; CHECK: [[DEF7:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
58 ; CHECK: [[DEF8:%[0-9]+]]:vreg_64 = IMPLICIT_DEF
59 ; CHECK: undef %11.sub0:vreg_64 = V_MOV_B32_e32 0, implicit $exec
61 ; CHECK: successors: %bb.2(0x80000000)
62 ; CHECK: dead %12:vreg_64 = COPY [[DEF]]
63 ; CHECK: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[DEF3]]
64 ; CHECK: dead %14:vgpr_32 = COPY [[DEF2]]
65 ; CHECK: [[COPY3:%[0-9]+]]:vgpr_32 = COPY [[DEF5]].sub1
66 ; CHECK: dead %16:vgpr_32 = COPY %11.sub0
67 ; CHECK: undef %17.sub0:vreg_64, %18:sreg_64_xexec = V_ADD_CO_U32_e64 [[DEF4]].sub0, [[DEF6]].sub0, 0, implicit $exec
68 ; CHECK: dead undef %17.sub1:vreg_64, dead %19:sreg_64_xexec = V_ADDC_U32_e64 [[DEF4]].sub1, [[DEF6]].sub1, %18, 0, implicit $exec
69 ; CHECK: [[GLOBAL_LOAD_DWORDX2_:%[0-9]+]]:vreg_64 = GLOBAL_LOAD_DWORDX2 [[DEF1]], 0, 0, implicit $exec :: (load (s64), addrspace 1)
70 ; CHECK: dead %20:sreg_64 = V_CMP_GT_I32_e64 4, [[DEF7]], implicit $exec
71 ; CHECK: GLOBAL_STORE_DWORDX2 [[COPY]], [[DEF8]], 288, 0, implicit $exec :: (store (s64), addrspace 1)
73 ; CHECK: successors: %bb.3(0x80000000)
74 ; CHECK: [[COPY4:%[0-9]+]]:vgpr_32 = COPY [[COPY2]]
76 ; CHECK: successors: %bb.2(0x40000000), %bb.4(0x40000000)
77 ; CHECK: undef [[DEF5]].sub1:vreg_64 = COPY [[COPY3]]
78 ; CHECK: S_CBRANCH_EXECZ %bb.2, implicit $exec
80 ; CHECK: successors: %bb.5(0x80000000)
81 ; CHECK: dead %21:sreg_64 = COPY $exec
82 ; CHECK: dead %22:vreg_128 = GLOBAL_LOAD_DWORDX4 [[COPY1]], 0, 0, implicit $exec :: (load (s128), addrspace 1)
83 ; CHECK: DBG_VALUE %22, $noreg, <0x{{[0-9a-f]+}}>, !DIExpression(DW_OP_constu, 1, DW_OP_swap, DW_OP_xderef), debug-location !DILocation(line: 0, scope: <0x{{[0-9a-f]+}}>)
85 ; CHECK: successors: %bb.3(0x40000000), %bb.1(0x40000000)
86 ; CHECK: S_CBRANCH_EXECZ %bb.3, implicit $exec
87 ; CHECK: S_BRANCH %bb.1
89 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
91 %0:vreg_64 = COPY $vgpr0_vgpr1
92 %1:vreg_64 = COPY $vgpr2_vgpr3
93 %2:vreg_64 = IMPLICIT_DEF
94 %3:vreg_64 = IMPLICIT_DEF
95 %4:vgpr_32 = IMPLICIT_DEF
96 %5:vgpr_32 = IMPLICIT_DEF
97 %6:vreg_64 = IMPLICIT_DEF
98 %7:vreg_64 = IMPLICIT_DEF
99 %8:vreg_64 = IMPLICIT_DEF
100 %9:vgpr_32 = IMPLICIT_DEF
101 %10:vreg_64 = IMPLICIT_DEF
102 undef %11.sub0:vreg_64 = V_MOV_B32_e32 0, implicit $exec
105 %12:vreg_64 = COPY %2
106 %13:vgpr_32 = COPY %5
107 dead %14:vgpr_32 = COPY %4
108 %15:vgpr_32 = COPY %7.sub1
109 dead %16:vgpr_32 = COPY %11.sub0
110 undef %17.sub0:vreg_64, %18:sreg_64_xexec = V_ADD_CO_U32_e64 %6.sub0, %8.sub0, 0, implicit $exec
111 dead %17.sub1:vreg_64, dead %19:sreg_64_xexec = V_ADDC_U32_e64 %6.sub1, %8.sub1, %18, 0, implicit $exec
112 %6:vreg_64 = GLOBAL_LOAD_DWORDX2 %3, 0, 0, implicit $exec :: (load (s64), addrspace 1)
113 dead %20:sreg_64 = V_CMP_GT_I32_e64 4, %9, implicit $exec
114 GLOBAL_STORE_DWORDX2 %0, %10, 288, 0, implicit $exec :: (store (s64), addrspace 1)
117 %5:vgpr_32 = COPY %13
120 undef %7.sub1:vreg_64 = COPY %15
121 S_CBRANCH_EXECZ %bb.2, implicit $exec
124 dead %21:sreg_64 = COPY $exec
125 %22:vreg_128 = GLOBAL_LOAD_DWORDX4 %1, 0, 0, implicit $exec :: (load (s128), addrspace 1)
126 DBG_VALUE %22, $noreg, !16, !DIExpression(DW_OP_constu, 1, DW_OP_swap, DW_OP_xderef), debug-location !21
129 S_CBRANCH_EXECZ %bb.3, implicit $exec