https://github.com/gysit commented: Nice! Looks good to me! Can you verify if this works together with canoncialize/region simplify or if we may delete dead blocks bcs the indirect branch cannot be analyzed (I tried to describe an example in the comments below). https://github.com/llvm/llvm-project/pull/135092