Daniel Berlin wrote:
On 9/27/06, Roberto COSTA <[EMAIL PROTECTED]> wrote:

Hello,
I have a question about the form of COND_EXPR nodes allowed in GIMPLE
representation.
By looking at what gimplify.c does (more precisely, at function
gimplify_cond_expr (...) ), I understood that GIMPLE only allows a
restricted form of COND_EXPR, in which both 'then' and 'else' operands
are GOTO_EXPR nodes.


This is true for the conditional form that appears as a statement

However, when compiling with -ftree-vectorize command-line option, there
are cases of COND_EXPR nodes generated and not gimplified (in the sense
of my previous sentence).


However, it is possible for them to also appear on the RHS of a
MODIFY_EXPR in order to represent the results of if-conversion.

IE
a = b ? c : d

In this form, I believe each arm is required to be an SSA_VAR_P

The way to differentiate the two is that the first form *only* appears
as a statement, and the second form *only* appears on the RHS of a
MODIFY_EXPR.

Thanks for the explanation.
The COND_EXPRs I saw were indeed of this second form.

What is a bit surprising at second sight (first sight was my point of view while writing the first message) is that gimplify pass expands the COND_EXPRs of the second form into control-flow. Therefore, it looks like the only ones that can be found after gimplification are those generated by a further pass.

Cheers,
Roberto

Reply via email to