etherzhhb wrote: Hi, i think this code assume we run the loop close SSA pass first. Could you include a LIT test to demonstrate the problem? I am not sure this is the right fix to your problem. https://github.com/llvm/llvm-project/pull/93598