This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
AltiVec [RFH] Overload resolution of vec_subs intrinsic fails
- From: Fariborz Jahanian <fjahanian at apple dot com>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 8 Apr 2004 17:26:32 -0700
- Subject: 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
...