https://github.com/razvanlupusoru approved this pull request. This looks better with no temp. Seems reasonable to not require same type and to relax this on the atomic ops. Looks good to me. https://github.com/llvm/llvm-project/pull/114390