[Bug target/84760] Finish implementation of __builtin_altivec_lvx_v1ti
kelvin at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Mar 8 16:42:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84760
--- Comment #2 from kelvin at gcc dot gnu.org ---
I don't argue either way on this, but it looks to me like we do not currently
have support for __int128 with vec_ld.
1. I can't fine it in the rs6000-c tables.
2. This test fails to compile:
#include <stdio.h>
#include <altivec.h>
static vector unsigned char uc;
static vector __int128 v;
static vector __int128 *pi;
void
doInitialization ()
{
v[0] = -1;
pi = &v;
}
int
main (int argc, char *argv)
{
__int128 entry;
int i;
/* Apparent usage:
* <Type> result = vec_ld (int index, vector<Type> v)
* is equivalent to:
* result = v [index];
*/
doInitialization ();
entry = vec_ld (0, pi);
i = (int) entry;
printf ("result of vec_ld is %d\n", i);
return 0;
}
$GCC_BUILD/gcc/xgcc -B$GCC_BUILD/gcc/ -O1 -o kelvin-1 kelvin-1.c
kelvin-1.c: In function ‘main’:
kelvin-1.c:36:3: error: invalid parameter combination for AltiVec intrinsic
‘__builtin_vec_ld’
entry = vec_ld (0, pi);
^~~~~
Makefile:26: recipe for target 'kelvin-1' failed
make: *** [kelvin-1] Error 1
By the way, it's probably obvious everyone else what vec_ld is supposed to do,
but it's not documented anywhere that I can find...
More information about the Gcc-bugs
mailing list