public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Vector modes and C++ not supported?
@ 2003-04-24 13:33 Richard Guenther
  2003-05-02  0:52 ` Aldy Hernandez
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Guenther @ 2003-04-24 13:33 UTC (permalink / raw)
  To: gcc; +Cc: Alexander Ehlert

Hi!

With g++-3.3 (GCC) 3.3 20030423 (prerelease) I get for the testcase

typedef float v4sf __attribute__((mode(V4SF)));
void foo()
{
	v4sf a, b, c;
	a = b + c;
}

bellatrix:~/src/tests$ g++-3.3 -c -msse2 simd2.cpp
simd2.cpp: In function `void foo()':
simd2.cpp:6: error: invalid operands of types `vector float' and `vector
float'
   to binary `operator+'

while compiling using gcc is fine. Is this supposed to happen, and how
can one workaround this limitation? Will C++ support for this type of
automatic vectorization be added in the future?

Thanks, Richard.

--
Richard Guenther <richard dot guenther at uni-tuebingen dot de>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Vector modes and C++ not supported?
  2003-04-24 13:33 Vector modes and C++ not supported? Richard Guenther
@ 2003-05-02  0:52 ` Aldy Hernandez
  2003-05-02  0:58   ` Andrew Pinski
  0 siblings, 1 reply; 5+ messages in thread
From: Aldy Hernandez @ 2003-05-02  0:52 UTC (permalink / raw)
  To: Richard Guenther; +Cc: gcc, Alexander Ehlert

>>>>> "Richard" == Richard Guenther <rguenth@tat.physik.uni-tuebingen.de> writes:

 > typedef float v4sf __attribute__((mode(V4SF)));
 > void foo()
 > {
 > 	v4sf a, b, c;
 > 	a = b + c;
 > }

 > bellatrix:~/src/tests$ g++-3.3 -c -msse2 simd2.cpp
 > simd2.cpp: In function `void foo()':
 > simd2.cpp:6: error: invalid operands of types `vector float' and `vector
 > float'
 >    to binary `operator+'

 > while compiling using gcc is fine. Is this supposed to happen, and how
 > can one workaround this limitation? Will C++ support for this type of
 > automatic vectorization be added in the future?

This was working with the old C++ parser.  It looks like it fell
through the cracks.  I don't recall writing a C++ testcase for this,
so it very well be partly my fault.

Please file a bug report.

Aldy

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Vector modes and C++ not supported?
  2003-05-02  0:52 ` Aldy Hernandez
@ 2003-05-02  0:58   ` Andrew Pinski
  2003-05-02  1:03     ` Aldy Hernandez
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Pinski @ 2003-05-02  0:58 UTC (permalink / raw)
  To: Aldy Hernandez; +Cc: Andrew Pinski, Richard Guenther, gcc, Alexander Ehlert

I had the same problem with the old C++ parser, around July 2002: 
<http://gcc.gnu.org/ml/gcc/2002-07/msg01425.html>.
I did not explain myself well back then about this though.

Thanks,
Andrew Pinski


On Thursday, May 1, 2003, at 20:52 US/Eastern, Aldy Hernandez wrote:

>>>>>> "Richard" == Richard Guenther 
>>>>>> <rguenth@tat.physik.uni-tuebingen.de> writes:
>
>> typedef float v4sf __attribute__((mode(V4SF)));
>> void foo()
>> {
>> 	v4sf a, b, c;
>> 	a = b + c;
>> }
>
>> bellatrix:~/src/tests$ g++-3.3 -c -msse2 simd2.cpp
>> simd2.cpp: In function `void foo()':
>> simd2.cpp:6: error: invalid operands of types `vector float' and 
>> `vector
>> float'
>>    to binary `operator+'
>
>> while compiling using gcc is fine. Is this supposed to happen, and how
>> can one workaround this limitation? Will C++ support for this type of
>> automatic vectorization be added in the future?
>
> This was working with the old C++ parser.  It looks like it fell
> through the cracks.  I don't recall writing a C++ testcase for this,
> so it very well be partly my fault.
>
> Please file a bug report.
>
> Aldy
>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Vector modes and C++ not supported?
  2003-05-02  0:58   ` Andrew Pinski
@ 2003-05-02  1:03     ` Aldy Hernandez
  2003-05-03 16:56       ` Richard Guenther
  0 siblings, 1 reply; 5+ messages in thread
From: Aldy Hernandez @ 2003-05-02  1:03 UTC (permalink / raw)
  To: Andrew Pinski; +Cc: Richard Guenther, gcc, Alexander Ehlert

>>>>> "Andrew" == Andrew Pinski <pinskia@physics.uc.edu> writes:

 > I had the same problem with the old C++ parser, around July 2002:
 > <http://gcc.gnu.org/ml/gcc/2002-07/msg01425.html>.
 > I did not explain myself well back then about this though.

 > Thanks,
 > Andrew Pinski

In that case, it's my fault entirely :(. The PR should be assigned to
me.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Vector modes and C++ not supported?
  2003-05-02  1:03     ` Aldy Hernandez
@ 2003-05-03 16:56       ` Richard Guenther
  0 siblings, 0 replies; 5+ messages in thread
From: Richard Guenther @ 2003-05-03 16:56 UTC (permalink / raw)
  To: Aldy Hernandez; +Cc: Andrew Pinski, Richard Guenther, gcc, Alexander Ehlert

On 1 May 2003, Aldy Hernandez wrote:

> >>>>> "Andrew" == Andrew Pinski <pinskia@physics.uc.edu> writes:
>
>  > I had the same problem with the old C++ parser, around July 2002:
>  > <http://gcc.gnu.org/ml/gcc/2002-07/msg01425.html>.
>  > I did not explain myself well back then about this though.
>
>  > Thanks,
>  > Andrew Pinski
>
> In that case, it's my fault entirely :(. The PR should be assigned to
> me.

This is now c++/10611, please assign it to you.

Richard.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-05-03 16:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-24 13:33 Vector modes and C++ not supported? Richard Guenther
2003-05-02  0:52 ` Aldy Hernandez
2003-05-02  0:58   ` Andrew Pinski
2003-05-02  1:03     ` Aldy Hernandez
2003-05-03 16:56       ` Richard Guenther

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).