[PATCH] D147721: [AMDGPU] Fix a case of updating LiveIntervals in SIOptimizeExecMaskingPreRA
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 8 00:47:13 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG985e24cc16ec: [AMDGPU] Fix a case of updating LiveIntervals in SIOptimizeExecMaskingPreRA (authored by foad).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147721/new/
https://reviews.llvm.org/D147721
Files:
llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp
Index: llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp
+++ llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp
@@ -294,7 +294,13 @@
LIS->removeVRegDefAt(*SelLI, SelIdx.getRegSlot());
LIS->RemoveMachineInstrFromMaps(*Sel);
+ bool ShrinkSel = Sel->getOperand(0).readsReg();
Sel->eraseFromParent();
+ if (ShrinkSel) {
+ // The result of the V_CNDMASK was a subreg def which counted as a read
+ // from the other parts of the reg. Shrink their live ranges.
+ LIS->shrinkToUses(SelLI);
+ }
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147721.511856.patch
Type: text/x-patch
Size: 692 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230408/0b3e8106/attachment.bin>
More information about the llvm-commits
mailing list