serge-sans-paille wrote: LGTM too. It's a bit sad that we couldn't make the optimization part of LLVM better instead of generating ad-hoc pattern, but as I couldn't find the time to work more on this, I'm not going to complain! https://github.com/llvm/llvm-project/pull/84230