This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: recent troubles with float vectors & bitwise ops
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: "'Ian Lance Taylor'" <iant at google dot com>, "'tbp'" <tbptbp at gmail dot com>
- Cc: <gcc at gnu dot org>
- Date: Wed, 22 Aug 2007 11:10:48 +0100
- Subject: RE: recent troubles with float vectors & bitwise ops
- References: <46CBC2E1.1010100@gmail.com> <m3ejhwcfza.fsf@localhost.localdomain>
On 22 August 2007 06:10, Ian Lance Taylor wrote:
> tbp <tbptbp@gmail.com> writes:
>
>> vecop.cc:4: error: invalid operands of types 'float __vector__' and
>> 'float __vector__' to binary 'operator|'
>> vecop.cc:5: error: invalid operands of types 'float __vector__' and
>> 'float __vector__' to binary 'operator&'
>> vecop.cc:6: error: invalid operands of types 'float __vector__' and
>> 'float __vector__' to binary 'operator^'
>>
>> Apparently it's still there as of right now, on x86-64 at least. I
>> think this is not supposed to happen but i'm not sure, hence the mail.
>
> What does it mean to do a bitwise-or of a floating point value?
>
> This code also gets an error:
>
> double foo(double a, double b) { return a | b; }
There are some notable fp hacks and speedups that make use of integer ops on
floating point operands, so it's not entirely an insane notion.
However, as Paolo points out upthread, that can be done with casts, which is
more correct anyway, so I don't think there's a problem with blocking the
unadorned usage.
cheers,
DaveK
--
Can't think of a witty .sigline today....