Swap Two Variables Without Using a Temp Variable
chris-taylor.github.com
chris-taylor.github.com
Moreover, most modern CPU architectures will just fake the architectural register moves and just use register renaming techniques to avoid the issue completely.
TL;DR: any trick like this will just make your code slower and just use more architectural registers since neither the compiler nor the hardware will be able to reason about your intentions