[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:34:51 PDT 2022


foad added a comment.

> It queries the scavenger for SGPR and
> if available saves SCC to it and restore its value after frame lowering code
> insertion.

What if there is no free SGPR? I don't think it's acceptable to generate broken code in that case.



================
Comment at: llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp:2233
+        MachineBasicBlock::iterator I(MI);
+        if (RS->isRegUsed(AMDGPU::SCC))
+        while (I != MBB->end()) {
----------------
Need braces and indentation for the body of this "if".


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