bwmaples wrote: Oh, I'm sorry to reply late. Is this the right way to fix this bug. > You shouldn't check for loop simplify form -- instead check the specific property that is needed to make the transform legal. https://github.com/llvm/llvm-project/pull/112845