If branch elimination is your goal, you might consider math or some intolerable solutions.
Consider the following example:
if (a < b) y = C; else y = D;
It can be rewritten as ...
x = -(a < b); x &= (C - D); x += D;
For the above solution to work, it is assumed that your processor can evaluate a <b without generating a jump instruction. It also kills readability.
Is it worth it? Sometimes, but usually not. If the wrong prediction of branching or branching cost you dearly because it is not biased towards one branch or another, maybe . But probably not. As always, profile.
A little math / arithmetic can go a long way in eliminating branches if that is your goal. Although it has been said many times before, simply because you can do something, it does not mean that you should.
Hope this helps.
source share