This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/43920] Choosing conditional execution over conditional branches for code size in some cases.



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]