https://github.com/david-arm commented: Thanks for this! Looks like a nice improvement. :) I had a suggestion on how to improve this by matching a pattern earlier in the pipeline. https://github.com/llvm/llvm-project/pull/157665