https://github.com/davemgreen commented: I was wondering if this could be tablegen patterns, but it looks OK and gisel seems to do something different entirely. https://github.com/llvm/llvm-project/pull/194833