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

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 25 02:10:57 PDT 2026


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

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

>From 4364e697fcf3e35d11b86261038d9a2bfa7571a8 Mon Sep 17 00:00:00 2001
From: Jay Foad <jay.foad at gmail.com>
Date: Fri, 25 Sep 2026 10:09:13 +0100
Subject: [PATCH] [AMDGPU] Make setImpSCCDefDead default to true. NFC.

In SILowerControlFlow, in helper function setImpSCCDefDead, make parameter IsDead default to true to match MachineOperand::setIsDead.
---
 llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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) {



More information about the llvm-commits mailing list