https://github.com/joker-eph commented: I suspect we should have separate PR for each of the 3 changes mentioned in the description, can you split it please? Let's keep this one for the added canonicalization pattern. https://github.com/llvm/llvm-project/pull/164159