fhahn wrote: I recommitted the PR in b841e2eca3b5c8b408214a46593f6a025e0fe48b, after adding tests for the issues mentioned above and landing a number of fixes, including https://github.com/llvm/llvm-project/pull/96622 https://github.com/llvm/llvm-project/pull/92555