bzEq wrote: I'm not really catching where miscompilation occurs, could you please elaborate? To my understanding, the original transformation looks correct, https://alive2.llvm.org/ce/z/Vtb2Ux. https://github.com/llvm/llvm-project/pull/84419