[llvm] [AMDGPU] Remove implicit conversions of MCRegister to unsigned. NFC (PR #167284)

Sergei Barannikov via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 10 23:29:00 PST 2025


================
@@ -1214,7 +1214,7 @@ static unsigned CheckVGPROverflow(unsigned Reg, const MCRegisterClass &RC,
 
   assert(BaseReg && "Only vector registers expected");
 
-  return (Sub0 - BaseReg + NumRegs <= 256) ? Reg : AMDGPU::NoRegister;
+  return (Sub0 - BaseReg + NumRegs <= 256) ? Reg : MCRegister();
----------------
s-barannikov wrote:

If you're inclined to leaving the operator out, `[[deprecated]]` on it could help detect such cases without breaking the build


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


More information about the llvm-commits mailing list