[llvm] [AMDGPU] Make setImpSCCDefDead default to true. NFC. (PR #226406)

via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 25 02:11:42 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-backend-amdgpu

Author: Jay Foad (jayfoad)

<details>
<summary>Changes</summary>

In SILowerControlFlow, in helper function setImpSCCDefDead, make parameter IsDead default to true to match MachineOperand::setIsDead.

---
Full diff: https://github.com/llvm/llvm-project/pull/226406.diff


1 Files Affected:

- (modified) llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp (+2-2) 


``````````diff
diff --git a/llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp b/llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp
index 6c87ba5438f3d..4e3dee8ad57c1 100644
--- a/llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp
+++ b/llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp
@@ -173,7 +173,7 @@ char SILowerControlFlowLegacy::ID = 0;
 INITIALIZE_PASS(SILowerControlFlowLegacy, DEBUG_TYPE, "SI lower control flow",
                 false, false)
 
-static void setImpSCCDefDead(MachineInstr &MI, bool IsDead) {
+static void setImpSCCDefDead(MachineInstr &MI, bool IsDead = true) {
   MachineOperand &ImpDefSCC = MI.getOperand(3);
   assert(ImpDefSCC.getReg() == AMDGPU::SCC && ImpDefSCC.isDef());
 
@@ -252,7 +252,7 @@ void SILowerControlFlow::emitIf(MachineInstr &MI) {
   if (LV)
     LV->replaceKillInstruction(Cond.getReg(), MI, *And);
 
-  setImpSCCDefDead(*And, true);
+  setImpSCCDefDead(*And);
 
   MachineInstr *Xor = nullptr;
   if (!SimpleIf) {

``````````

</details>


https://github.com/llvm/llvm-project/pull/226406


More information about the llvm-commits mailing list