Hi, On Wed, 18 Sep 2013, Zhenqiang Chen wrote:
> The patch is updated according to your comments. It is a basic support, > which does not touch ifcombine and jump related optimizations yet. > > Current method is: > 1) In fold-const, if HAVE_conditional_compare, set > LOGICAL_OP_NON_SHORT_CIRCUIT > to optimize_function_for_speed_p. So we do not depend on BRANCH_COST. > 2) Identify CCMP during expanding. A CCMP candidate is a BIT_AND_EXPR > or BIT_IOR_EXPR, whose operators are compares. > 3) Add a new op in optab to expand the CCMP to optimized RTL, In addition to what Richi said, some comments on style/naming: Settle either on "ccmp" or "conditional_compare" (or some shorter variant) consistently, for the whole patch (as part of the patterns, as part of function names, as part of macro names). +static bool +is_conditional_compare_candidate_p (gimple g) +{ Either is_<name> or <name>_p, choose one, not a mix. RTL code (and me) prefers the _p variant. Ciao, Michael.