https://github.com/banach-space approved this pull request. Fantastic, thank for the fix and for simplifying this! I've left some minor suggestion re comments, but approving as is - the core logic LG. https://github.com/llvm/llvm-project/pull/160246