https://github.com/lukel97 approved this pull request. Makes sense to me and RISC-V diffs look good. Can't comment on what isConstantPhysReg implies for the other targets though so maybe wait for a 2nd reviewer https://github.com/llvm/llvm-project/pull/93285