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]

AltiVec [RFH] Overload resolution of vec_subs intrinsic fails



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);
}


... lvx v1,r30,r0 li r0,64 lvx v0,r30,r0 vsubuhs v0,v1,v0 <----- li r0,32 stvx v0,r30,r0 ...


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