S_ENDPGM implicit %2
...
+---
+
+# This requires searching through many DBG_VALUE instructions before the insert poitn, which
+# should not count against the search limit.
+
+name: vcc_liveness_dbg_value_search_before
+tracksRegLiveness: true
+
+body: |
+ bb.0:
+ ; GCN-LABEL: name: vcc_liveness_dbg_value_search_before
+ ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
+ ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: [[V_ADD_I32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_I32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
+ ; GCN: S_ENDPGM implicit [[V_ADD_I32_e32_]]
+ %0:sreg_32_xm0 = S_MOV_B32 12345
+ %1:vgpr_32 = IMPLICIT_DEF
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ %2:vgpr_32, %3:sreg_64 = V_ADD_I32_e64 %0, %1, implicit $exec
+ S_ENDPGM implicit %2
+
+...
+---
+
+# This requires searching through many DBG_VALUE instructions after the insert point, which
+# should not count against the search limit.
+
+name: vcc_liveness_dbg_value_search_after
+tracksRegLiveness: true
+
+body: |
+ bb.0:
+ ; GCN-LABEL: name: vcc_liveness_dbg_value_search_after
+ ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
+ ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
+ ; GCN: [[V_ADD_I32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_I32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: DBG_VALUE $noreg, 0
+ ; GCN: S_ENDPGM implicit [[V_ADD_I32_e32_]]
+ %0:sreg_32_xm0 = S_MOV_B32 12345
+ %1:vgpr_32 = IMPLICIT_DEF
+ S_NOP 0
+ S_NOP 0
+ S_NOP 0
+ S_NOP 0
+ S_NOP 0
+ S_NOP 0
+ S_NOP 0
+ S_NOP 0
+ S_NOP 0
+ S_NOP 0
+ S_NOP 0
+ S_NOP 0
+ S_NOP 0
+ S_NOP 0
+ S_NOP 0
+ S_NOP 0
+ S_NOP 0
+ S_NOP 0
+ S_NOP 0
+ S_NOP 0
+ S_NOP 0
+ S_NOP 0
+ S_NOP 0
+ S_NOP 0
+ S_NOP 0
+ S_NOP 0
+ S_NOP 0
+ S_NOP 0
+ %2:vgpr_32, %3:sreg_64 = V_ADD_I32_e64 %0, %1, implicit $exec
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ DBG_VALUE $noreg, 0
+ $vcc = S_MOV_B64 0
+ S_ENDPGM implicit %2
+
+...