https://github.com/davemgreen approved this pull request. LGTM thanks. I wasn't able to get this to come up without turning off sinking in CGP, but I can imagine it could in some more complex situation. https://github.com/llvm/llvm-project/pull/142167