The fastest way to compute the absolute value of a twos complement number is a common enough operation that optimized implementations are widely available. So let's consider another case. What if we want to get the absolute value of a one's complement number using x86 assembly?
A quick but probably suboptimal branchless implementation that I have is to take the sign bit by ANDING with a 10000.... mask and shifting, multiplying that with a 11111... mask, and xor that to the original number. But is there a better way to do it?
One application where this pops up is for an optimal implementation of grey decoding. The common implementation of a grey decode for a 64 bit integer uses six xor operations and six bitshifts. However, carryless multiplication of a number with ......1111110 will give either the grey decoding or its bitwise negation, and taking the ones complement abs value of that gives the grey decoding. As long as that can be microoptimized, it should be faster than the most widespread way of doing it. For the purpose of the question, the starting state can be assumed to be either any standard C calling convention or right after a CLMUL operation (taking the non-carry output).