https://github.com/aemerson commented: We should avoid unnecessarily calling `getOpcodeDef()` on a register. Instead do a lookup of the def once with `getDefIgnoringCopies()` and then use `dyn_cast<G https://github.com/llvm/llvm-project/pull/85321