This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Where have all the conditional moves gone?
- From: James E Wilson <wilson at specifix dot com>
- To: Piotr Wyderski <piotr dot wyderski at wp dot pl>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 22 Aug 2005 12:25:04 -0700
- Subject: Re: Where have all the conditional moves gone?
- References: <010e01c5a572$4cb9d8b0$0100a8c0@voltan>
Piotr Wyderski wrote:
> I have disassembled my program produced by g++ 4.0.0
> and I see a very strange behaviour -- the compiler doesn't
> generate cmov-s (-O3 -march=pentium3). G++ 3.4 generates
> them. So, how can I reactivate cmov-s in the newest version
> of the compiler? fif-conversion doesn't work...
I tried a very simple testcase. When I compile it with -O
-march=pentium3 -m32 I get a cmov instruction. This is using the
gcc-4.0.x branch, on an x86_64 host, with the attached testcase. I am
not convinced that anything is broken here. If there really is a
problem here, you will need to give us a better bug report.
--
Jim Wilson, GNU Tools Support, http://www.specifix.com
int
sub (int i, int j, int k)
{
if (k >= 0)
i = j;
return i;
}