AltiVec [RFH] Overload resolution of vec_subs intrinsic fails
Andrew Pinski
pinskia@physics.uc.edu
Fri Apr 9 00:35:00 GMT 2004
On Apr 8, 2004, at 20:33, Andrew Pinski wrote:
> On Apr 8, 2004, at 20:26, Fariborz Jahanian wrote:
>
>>
>> In the following test case, gcc3.5, etc. incorrectly generate
>> 'vsubuhs' instead of the
>> signed variety. It is because overload resolution of vec_subs selects
>> __builtin_altivec_vsubuhs, instead of __builtin_altivec_vsubshs. Our
>> AltiVec
>> front-end guy is out on vacation and I appreciate help in resolving
>> this issue. I
>> have spent enough time on this that I think I need to ask some one.
>>
>> - Thanks, Fariborz (fjahanian@apple.com)
>>
>> Test case:
>>
>> #include <altivec.h>
>> int main()
>> {
>> __vector signed short res;
>> __vector signed short t8;
>> __vector signed short t9;
>> res = vec_subs(t8, t9);
>> }
>
> This is because __builtin_types_compatible_p (__vector bool short,
> __vector signed short) is
> returning 1.
I forgot to mention here is the test case I used and say that it said 1:
int f()
{
return __builtin_types_compatible_p (__vector bool short, __vector
signed short);
}
Thanks,
Andrew Pinski
More information about the Gcc
mailing list