This is the mail archive of the gcc@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: COND_EXPRs in GIMPLE code and vectorizer


On 9/27/06, Roberto COSTA <roberto.costa@st.com> 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.

HTH,
Dan


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