https://github.com/paulwalker-arm approved this pull request. On reflection everything I've mentioned are clang issues whereas here you're not doing anything wrong from the IR's point of view. https://github.com/llvm/llvm-project/pull/96305