[llvm] ecf014e - Revert "Revert "[AMDGPU] Update LiveVariables in SILowerControlFlow""

Mateja Marjanovic via llvm-commits llvm-commits at lists.llvm.org
Wed May 3 08:37:48 PDT 2023


Author: Mateja Marjanovic
Date: 2023-05-03T17:36:20+02:00
New Revision: ecf014e02b945e7739bf38a934718d9640eef75b

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

LOG: Revert "Revert "[AMDGPU] Update LiveVariables in SILowerControlFlow""

Accidental error.

This reverts commit 2e823da8dc652b23738e2d3b8e7e7f21335816eb.

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 0e2bf9dad64f..9607092c70af 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