================ ---------------- rengolin wrote: This is not a reasonable generic transformation, as it's undoing LICM. If you want to move operations across different regions, I'd suggest an extra flag to allow that. https://github.com/llvm/llvm-project/pull/186647