Hi, On Wed, 12 Oct 2011, Kai Tietz wrote:
> > And I think it could use some overview of the transformation done like in > > the initial patch, ala: > > > > "Transform ((A && B) && C) into (A && (B & C))." > > > > and > > > > "Or (A && B) into (A & B)." for this part: > > > > + /* Needed for sequence points to handle trappings, and side-effects. > > */ > > + else if (simple_operand_p_2 (arg0)) > > + return fold_build2_loc (loc, ncode, type, arg0, arg1); > > Well to use here binary form of operation seems to me misleading. Hmm? What do you mean? Both operations are binary. ANDIF is '&&', AND is '&'. In fold-const.c comments we usually use the C notations of the operations. > It is right that the non-IF AND/OR has finally the same behavior as the > binary form in gimple. Nevertheless it isn't the same on AST level. But > sure I can Add comments for operations like (A OR/AND-IF B) OR/AND-IF C > -> (A OR/AND-IF (B OR/AND C and A OR/AND-IF C -> (A OR/AND C) Too much noise, leave out the || variant, and just say once "Same for ||." Ciao, Michael.