[PATCH] D136169: [AMDGPU] Avoid SCC clobbering before S_CSELECT_B32

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 18 07:36:39 PDT 2022


foad added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp:846
         .addReg(FIReg);
+        Add->getOperand(3).setIsDead(); // Mark SCC as dead.
     return BaseReg;
----------------
Weird indentation here. Can you run `git clang-format` on this change?


================
Comment at: llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp:2247
+          SCCCopy = RS->scavengeRegister(getBoolRC(), MI, 0, !UseSGPR);
+          if (SCCCopy != AMDGPU::NoRegister)
+            BuildMI(*MBB, MI, DL,
----------------
Don't need the ` != AMDGPU::NoRegister` because Register converts to bool.

Need braces around the multi-line BuildMI call.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136169/new/

https://reviews.llvm.org/D136169



More information about the llvm-commits mailing list