[cfe-dev] conditional operator
daniel.dunbar at gmail.com
Tue Jul 20 16:24:32 PDT 2010
This is by design, generating a select requires analyzing the operands
in the ?: operator to determine whether they have side effects. We
generally prefer to leave those kinds of optimizations to the backend,
unless there is a clear compile time opportunity.
On Jul 20, 2010, at 7:39, Jochen Wilhelmy <j.wilhelmy at arcor.de> wrote:
> when using something like
> (a < b) ? a : b
> I would expect that the select instruction is always used.
> But, if a or b are a global variable, a real branch with multiple
> basic blocks is created. Is this a bug or a feature?
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
More information about the cfe-dev