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
Chris Lattner <clattner@apple.com> writes:
> On Aug 24, 2007, at 8:02 AM, Ian Lance Taylor wrote:
> > Permitting this extension continues the preexisting behaviour, and it
> > helps programmers and helps existing code. Who does it hurt to permit
> > this extension? Who does it help to forbid this extension?
>
> Aren't builtins the designated way to access processor-specific
> features like this? Why does there have to be C operators for
> obscure features like this?
A fair question, but we've already decided to support vector + vector
and such operations, and we've decided that that is one valid way to
generate vector instructions. That decision may itself have been a
mistake. But once we accept that decision, then, given that we know
that the processor supports bitwise-or on floating point values, using
a instruction different from that for bitwise-or on integer values,
then it is fair to ask why we don't support vector | vector for
floating point vectors.
> Wouldn't it be better to fix the code generator to do the right thing
> regardless of how the user presents it? There is a lot of code that
> uses casts (including the builtin implementations themselves) - it
> seems worthwhile to generate instructions for the right domain for
> this code as well.
I completely agree.
Ian