Next: , Previous: Compound Lvalues, Up: GIMPLE Expressions Conditional Expressions

A C ?: expression is converted into an if statement with each branch assigning to the same temporary. So,

       a = b ? c : d;


       if (b)
         T1 = c;
         T1 = d;
       a = T1;

Tree level if-conversion pass re-introduces ?: expression, if appropriate. It is used to vectorize loops with conditions using vector conditional operations.

Note that in GIMPLE, if statements are also represented using COND_EXPR, as described below.