topperc wrote: I'm pretty sure some of this is copied from AArch64. That's a helpful thing to mention in the description as it makes it easier to review if we can cross reference the prior art. Can you mention any notable differences? https://github.com/llvm/llvm-project/pull/124717