https://github.com/VladiKrapp-Arm approved this pull request. Checked that this does resolve the crash. LGTM, but I'd appreciate a review from someone a bit more familiar with the domain. https://github.com/llvm/llvm-project/pull/168948