This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: x86 code generation question
- From: Vadim Lobanov <vadim at cs dot washington dot edu>
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: Paul Koning <pkoning at equallogic dot com>, <gcc at gcc dot gnu dot org>
- Date: Thu, 29 Apr 2004 16:23:56 -0700 (PDT)
- Subject: Re: x86 code generation question
Ah, okay. So essentially it is done this way to maintain generality and
architecture-independence of the code that translates syntax trees into
RTL. This makes a lot more sense now. Thanks. :)
-Vadim
On Thu, 29 Apr 2004, Zack Weinberg wrote:
> Vadim Lobanov <vadim@cs.washington.edu> writes:
>
> ...
> > Thus, when we compile with no optimizations, and it has the conditional
> > move available, why does gcc choose to instead generate assembly with a
> > jump instead of conditional move?
>
> Because you compiled without optimization. Turning branches into
> conditional moves is implemented strictly as an optimization. The
> code that translates from abstract syntax trees to RTL doesn't know
> anything about them.
>
> zw
>