tschuett wrote: The general assumption is that IR is in canonical form and middle-end optimizations should not be ported to the backends. But reality is at odds with that statement. There are size improvements in this PR. https://github.com/llvm/llvm-project/pull/105991