[llvm] [AMDGPU] Save/Restore SCC bit across waterfall loop. (PR #68363)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 12 08:26:56 PDT 2023


================
@@ -6056,6 +6056,18 @@ loadMBUFScalarOperandsFromVGPR(const SIInstrInfo &TII, MachineInstr &MI,
   unsigned MovExecOpc = ST.isWave32() ? AMDGPU::S_MOV_B32 : AMDGPU::S_MOV_B64;
   const auto *BoolXExecRC = TRI->getRegClass(AMDGPU::SReg_1_XEXECRegClassID);
 
+  // Save SCC. Waterfall Loop may overwrite SCC.
+  Register SaveSCCReg;
+  bool SCCNotDead = (MBB.computeRegisterLiveness(TRI, AMDGPU::SCC, MI, 30) !=
+                     MachineBasicBlock::LQR_Dead)
+                        ? true
+                        : false;
----------------
jayfoad wrote:

Remove `? true : false`

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


More information about the llvm-commits mailing list