[llvm] 069f027 - [AMDGPU] Update LiveVariables in SILowerControlFlow

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Wed May 3 08:10:54 PDT 2023


Author: Jay Foad
Date: 2023-05-03T16:10:46+01:00
New Revision: 069f027e1e6b1db9e3e6dcf4193c670e2be3d5d5

URL: https://github.com/llvm/llvm-project/commit/069f027e1e6b1db9e3e6dcf4193c670e2be3d5d5
DIFF: https://github.com/llvm/llvm-project/commit/069f027e1e6b1db9e3e6dcf4193c670e2be3d5d5.diff

LOG: [AMDGPU] Update LiveVariables in SILowerControlFlow

Update kills in one place that was missed. Fixes a test failure that
would otherwise be introduced by D149651.

Added: 
    

Modified: 
    llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp b/llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp
index 0e2bf9dad64f8..9607092c70afe 100644
--- a/llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp
+++ b/llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp
@@ -427,6 +427,8 @@ void SILowerControlFlow::emitLoop(MachineInstr &MI) {
       BuildMI(MBB, &MI, DL, TII->get(Andn2TermOpc), Exec)
           .addReg(Exec)
           .add(MI.getOperand(0));
+  if (LV)
+    LV->replaceKillInstruction(MI.getOperand(0).getReg(), MI, *AndN2);
 
   auto BranchPt = skipToUncondBrOrEnd(MBB, MI.getIterator());
   MachineInstr *Branch =


        


More information about the llvm-commits mailing list