https://github.com/uweigand approved this pull request. This looks to be an incremental improvement from a performance perspective, and it does also simplify the code, so we should just go for it. LGTM, thanks! https://github.com/llvm/llvm-project/pull/188823