This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: patch: Re: rfc: auto-casted vector types


>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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]