fhahn wrote: I'm unable to re-open the PR, the new, simplified version using dyn_cast (https://github.com/llvm/llvm-project/pull/166245) is here https://github.com/llvm/llvm-project/pull/168385 https://github.com/llvm/llvm-project/pull/165825