https://github.com/arsenm approved this pull request. This is a lot simpler and the old code definitely shouldn't have been trying to look at the underlying IR https://github.com/llvm/llvm-project/pull/137820