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: AltiVec [RFH] Overload resolution of vec_subs intrinsic fails


> Anyway, unsigned types are compatible with signed ones, aren't them? So the

Not for __builtin_types_compatible_p.  See c-parse.in for its
implementation, and config/rs6000/altivec.h for it's use.  We expect
signness to cause incompatability for this builtin.  Right now,
altivec.h is completely broken for C.


>     "The same is for gcc.dg/simd-1.c and gcc.dg/20020531-1.c, where one was
>     checking for incompatibility between vector types with different
>     signedness but the same mode, and the other was happily passing an
>     unsigned V8QI to __builtin_ia32_paddusb which expects a signed V8QI.

I agree that, for simd-1.c, the test should not expect an error on
sign difference, so perhaps the problem is just the one use of
comptypes() for __builtin_types_compatible_p.  In which case, all we
need is to add a flag to comptypes() like I mentioned.

Richard, please advise.

Cheers.
Aldy


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