[llvm] [AMDGPU] V_SET_INACTIVE optimizations (PR #98864)

Diana Picus via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 29 02:51:11 PDT 2024


================
@@ -1514,7 +1536,19 @@ bool SIWholeQuadMode::lowerCopyInstrs() {
                           ? (unsigned)AMDGPU::COPY
                           : TII->getMovOpcode(TRI->getRegClassForOperandReg(
                                 *MRI, MI->getOperand(0)));
+    int Index = MI->findRegisterDefOperandIdx(AMDGPU::SCC, /*TRI=*/nullptr);
+    while (Index >= 0) {
+      MI->removeOperand(Index);
+      Index = MI->findRegisterUseOperandIdx(AMDGPU::SCC, /*TRI=*/nullptr);
----------------
rovka wrote:

Just for my education: Why do we have more than 1? 

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


More information about the llvm-commits mailing list