https://github.com/MacDue commented: I think all `const TargetRegisterInfo *TRI = &getRegisterInfo();` in this function can be replaced with `RI.` (which reuses the existing member variable). https://github.com/llvm/llvm-project/pull/162826