This is the mail archive of the 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: serious bugs in Altivec implementation of gcc

Am Die, 2002-08-13 um 09.24 schrieb Eyal Bagon:

> another thing that I noticed when comparing assembler code of 2 
> corresponding files it looks like the new gcc code is less optimised
> ( I attached the testMax_2.9.2.cpp and testMax_3.2.cpp and their 
> corresponding assembler files.
> I used : g++ -S -Wall -pedantic -ansi -Wno-long-long -DNDEBUG -O6 
> -DALTIVEC -fvec testMax_2.9.2.cpp
> and : g++ -S -Wall -pedantic -ansi -Wno-long-long -DNDEBUG -O6 -DALTIVEC 
> -maltivec testMax_3.2.cpp

Interesting. Your assembly produced by gcc 3.2 looks less optimal
because there's some additional code code generated to tell the OS
which vector registers to save on a context switch. Normally this is
only generated with -mabi=altivec and quite useless on Linux at least
because all AltiVec registers are saved.
I haven't played around with C++ and AltiVec yet and thus cannot comment
on the differences in the code generation between C and C++ but you
might want to use the former frontend for C code as it normally
generates better code if you restrict yourself to C features. Which OS
is this anyway?


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