GCC for Mac OS X

David Young dyoung@vviuh221.vvi.com
Mon Feb 14 16:41:00 GMT 2000

> Hmmm, do I read correctly, between the lines, here that generating
> vector code is dependent on support by frontends - bummer, that would
> mean that the following obvious Fortran candidate code isn't improved at
> all:
>       subroutine saxpy(x,a,y,n)
>       dimension x(n), y(n)
>       do i = 1, n
>          y(i) = y(i) + a * x(i)
>       enddo
>       end
> ?
> [ I hope the answer is no ;-) ]

As I understand it: the altivec patches to gcc do NOT perform automatic  
vectorization (loop unrolling). The code above is NOT altivec ready.

Altivec defines additional assembly instructions that operate on an extended  
data types called "vector" and "matrix", much like "float" is defined in  
regular c. The operators are overloaded to perform the arithmetic, much like  
a C++ library that defines vector types and overloads the obvious operators.

Thanks A Bunch! David Young; VVI-DCS

More information about the Gcc mailing list