offsake wrote: Hello @fhahn , LoopBlocksRPO RPO(TheLoop); code might guarantee that all visited blocks have an associated loop. It means that the check below is redundant, which I removed in the second commit. https://github.com/llvm/llvm-project/pull/132306