------- Comment #4 from carrot at google dot com 2010-04-29 02:23 ------- It is not only good to code size, but also benefit performance. For any path to any successor block, the same number of taken branch executed, but less alu instructions executed.
It may be difficult to calculate the tradeoff for an arbitrary condition expression. But for a condition composed of a series of || or && operation, such as if (A || B || C || ...) or if (A && B && C && ...) This simplification is always beneficial. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43920