Re: Question about vec_extract

2006-07-14 Thread James E Wilson
On Wed, 2006-07-12 at 17:57, Ian Lance Taylor wrote: > Personally, I think we should support operator[] for vectors. Indeed, that was one of the most popular choices when I first brought this topic up. I contributed mips vector support in August 2004, and in the multiple threads that patch spawne

Re: Question about vec_extract

2006-07-12 Thread Andrew Pinski
That said, I'm not happy with a builtin function. I think that we should make every effort to make union { TYPE a[COUNT]; VECTOR v; } u; u.v = v; x = u.a[0]; use vec_extract, because in the absence of operator[] that is the natural way for people to extract an element from a vector.

Re: Question about vec_extract

2006-07-12 Thread Ian Lance Taylor
Jim Wilson <[EMAIL PROTECTED]> writes: > Andrew Pinski wrote: > > I have been trying to figure out when the pattern vec_extract is > > invoked. > > I looked at this when I worked on the mips simd support. In > config/mips/mips-ps-3d.md I wrote > ;; ??? This is only generated if we perform a vect

Re: Question about vec_extract

2006-07-12 Thread Jim Wilson
Andrew Pinski wrote: I have been trying to figure out when the pattern vec_extract is invoked. I looked at this when I worked on the mips simd support. In config/mips/mips-ps-3d.md I wrote ;; ??? This is only generated if we perform a vector operation that has to be ;; emulated. There is n

Re: Question about vec_extract

2006-07-12 Thread Paolo Bonzini
Andrew Pinski wrote: I have been trying to figure out when the pattern vec_extract is invoked. I understand it is invoked from extract_bit_field but I don't see how it can be invoked. For both SSE and altivec I have tried the following code (which I thought would cause vec_extract pattern to be

Question about vec_extract

2006-07-12 Thread Andrew Pinski
I have been trying to figure out when the pattern vec_extract is invoked. I understand it is invoked from extract_bit_field but I don't see how it can be invoked. For both SSE and altivec I have tried the following code (which I thought would cause vec_extract pattern to be called) but on both,