AMDGPU: Fix counting debug instructions in execz skip threshold

This commit is contained in:
Matt Arsenault 2023-06-21 18:43:33 -04:00
parent 2f0047aad1
commit b953155b49
2 changed files with 8 additions and 1 deletions

View File

@ -320,6 +320,9 @@ bool SIPreEmitPeephole::mustRetainExeczBranch(
if (MI.isConditionalBranch())
return true;
if (MI.isMetaInstruction())
continue;
if (TII->hasUnwantedEffectsWhenEXECEmpty(MI))
return true;

View File

@ -2,7 +2,6 @@
---
# FIXME: RemoveShortExecBranches should not count dbg_value instructions.
# CHECK-LABEL: name: no_count_dbg_value
# CHECK: $vgpr1 = V_MOV_B32_e32 7, implicit $exec
# CHECK-NOT: S_CBRANCH_EXECZ
@ -18,6 +17,11 @@ body: |
successors: %bb.2
$vgpr0 = V_MOV_B32_e32 0, implicit $exec
DBG_VALUE
DBG_VALUE
DBG_VALUE
DBG_VALUE
DBG_VALUE
DBG_VALUE
bb.2:
$vgpr0 = V_MOV_B32_e32 1, implicit $exec