This is the mail archive of the gcc-patches@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]

Re: [4.1/4.0/3.4] fix pr19672 by tuning expansion of TRUTH_{AND,OR}_EXPR


> Could you please test changing
>
>   if (BRANCH_COST >= 4)
>
> to
>
>   if (BRANCH_COST >= 4
>
>      || TREE_SIDE_EFFECTS (TREE_OPERAND (exp, 1)))
>
> as in the attached patch (which is untested, but should apply to 4.1 and
> 4.0 and, with some fuzz, to 3.4 as well)?

Bootstrapped/regtested Ada on mainline (i586), as well as regtested against 
our internal testsuite, no new failures.

Given Richard's input, I personally think the patch is good enough for 4.x if 
you add a prominent comment explaining that you're explicitly turning a 
TRUTH_AND_EXPR into a TRUTH_ANDIF_EXPR and why you're allowed to do so.

Andrew might disagree though.

Thanks in advance.

-- 
Eric Botcazou


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