There is a classical page full of such things [1]. Not so long ago researchers looked into how to come up with such tricks automagically using program synthesis [2].
[1] https://graphics.stanford.edu/~seander/bithacks.html
[2] http://www.eecs.berkeley.edu/~sseshia/pubdir/synth-icse10.pd...