This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: patch: Re: rfc: auto-casted vector types
- From: Jim Wilson <wilson at redhat dot com>
- To: Graham Stott <graham dot stott at btinternet dot com>
- Cc: Aldy Hernandez <aldyh at redhat dot com>, Geoff Keating <geoffk at geoffk dot org>, Nick Clifton <nickc at redhat dot com>, gcc-patches at gcc dot gnu dot org, Kumar Gala <kumar dot gala at motorola dot com>, mark at codesourcery dot com, Zack Weinberg <zack at codesourcery dot com>
- Date: 19 Feb 2003 15:29:31 -0500
- Subject: Re: patch: Re: rfc: auto-casted vector types
- References: <38346FF9-443E-11D7-9EC3-000393750C1E@redhat.com><3E53DA7E.5070603@btinternet.com>
>If the arguments and return type are assignment compatible with the opaque
>type why do you need the casts?
If a builtin returns vector int, and the user assigns the result to vector
float, it doesn't matter that both types are assignment compatible with the
opaque type, because they aren't assignment compatible with each other.
This works only if there is an explicit cast to the opaque type in the middle.
This is why Aldy is proposing to add explicit casts to the intrinsics.
This also works if the builtin is changed to return the opaque type directly
as you suggested. Either solution should work.
Jim