[llvm] b953155 - AMDGPU: Fix counting debug instructions in execz skip threshold
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 2 05:09:46 PDT 2023
Author: Matt Arsenault
Date: 2023-08-02T08:09:41-04:00
New Revision: b953155b492ddd2080e01d939da13f5320b5bb1b
URL: https://github.com/llvm/llvm-project/commit/b953155b492ddd2080e01d939da13f5320b5bb1b
DIFF: https://github.com/llvm/llvm-project/commit/b953155b492ddd2080e01d939da13f5320b5bb1b.diff
LOG: AMDGPU: Fix counting debug instructions in execz skip threshold
Added:
Modified:
llvm/lib/Target/AMDGPU/SIPreEmitPeephole.cpp
llvm/test/CodeGen/AMDGPU/insert-skips-ignored-insts.mir
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/SIPreEmitPeephole.cpp b/llvm/lib/Target/AMDGPU/SIPreEmitPeephole.cpp
index 61444b14a56b75..87242a4740c8e9 100644
--- a/llvm/lib/Target/AMDGPU/SIPreEmitPeephole.cpp
+++ b/llvm/lib/Target/AMDGPU/SIPreEmitPeephole.cpp
@@ -320,6 +320,9 @@ bool SIPreEmitPeephole::mustRetainExeczBranch(
if (MI.isConditionalBranch())
return true;
+ if (MI.isMetaInstruction())
+ continue;
+
if (TII->hasUnwantedEffectsWhenEXECEmpty(MI))
return true;
diff --git a/llvm/test/CodeGen/AMDGPU/insert-skips-ignored-insts.mir b/llvm/test/CodeGen/AMDGPU/insert-skips-ignored-insts.mir
index 97c8b50c50cb06..92719a5ee53aea 100644
--- a/llvm/test/CodeGen/AMDGPU/insert-skips-ignored-insts.mir
+++ b/llvm/test/CodeGen/AMDGPU/insert-skips-ignored-insts.mir
@@ -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
More information about the llvm-commits
mailing list