[llvm] [RISCV] Replace uses of RISCV::NoRegister with Register(), isValid(), or operator bool. NFC (PR #161781)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 3 07:59:32 PDT 2025
================
@@ -1560,7 +1560,7 @@ static MCRegister getRVVBaseRegister(const RISCVRegisterInfo &TRI,
MCRegister BaseReg = TRI.getSubReg(Reg, RISCV::sub_vrm1_0);
// If it's not a grouped vector register, it doesn't have subregister, so
// the base register is just itself.
- if (BaseReg == RISCV::NoRegister)
+ if (!BaseReg)
----------------
topperc wrote:
In my prior conversations with @arsenm, I think we decided that we will add an `operator bool` when we remove `operator unsigned`.
https://github.com/llvm/llvm-project/pull/161781
More information about the llvm-commits
mailing list