| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-mdejagnu-cpu=power9 -mvsx -O2" } */ |
| 3 |
/* { dg-require-effective-target powerpc_vsx } */ |
| 4 |
/* { dg-require-effective-target int128 } */ |
| 5 |
|
| 6 |
/* PR90763: PowerPC vec_xl_len should take const. |
| 7 |
*/ |
| 8 |
|
| 9 |
#include <altivec.h> |
| 10 |
|
| 11 |
vector unsigned char vec_load_uc(unsigned char *p, int num) { |
| 12 |
return vec_xl_len(p, num); |
| 13 |
} |
| 14 |
vector unsigned char vec_load_const_uc(const unsigned char *p, int num) { |
| 15 |
return vec_xl_len(p, num); |
| 16 |
} |
| 17 |
vector signed char vec_load_sc(signed char *p, int num) { |
| 18 |
return vec_xl_len(p, num); |
| 19 |
} |
| 20 |
vector signed char vec_load_const_sc(const signed char *p, int num) { |
| 21 |
return vec_xl_len(p, num); |
| 22 |
} |
| 23 |
|
| 24 |
vector signed short vec_load_ss(signed short *p, int num) { |
| 25 |
return vec_xl_len(p, num); |
| 26 |
} |
| 27 |
vector signed short vec_load_const_ss(const signed short *p, int num) { |
| 28 |
return vec_xl_len(p, num); |
| 29 |
} |
| 30 |
vector unsigned short vec_load_us(unsigned short *p, int num) { |
| 31 |
return vec_xl_len(p, num); |
| 32 |
} |
| 33 |
vector unsigned short vec_load_const_us(const unsigned short *p, int num) { |
| 34 |
return vec_xl_len(p, num); |
| 35 |
} |
| 36 |
|
| 37 |
vector signed int vec_load_si(signed int *p, int num) { |
| 38 |
return vec_xl_len(p, num); |
| 39 |
} |
| 40 |
vector signed int vec_load_const_si(const signed int *p, int num) { |
| 41 |
return vec_xl_len(p, num); |
| 42 |
} |
| 43 |
vector unsigned int vec_load_ui(unsigned int *p, int num) { |
| 44 |
return vec_xl_len(p, num); |
| 45 |
} |
| 46 |
vector unsigned int vec_load_const_ui(const unsigned int *p, int num) { |
| 47 |
return vec_xl_len(p, num); |
| 48 |
} |
| 49 |
|
| 50 |
vector signed long long vec_load_sll(signed long long *p, int num) { |
| 51 |
return vec_xl_len(p, num); |
| 52 |
} |
| 53 |
vector signed long long vec_load_const_sll(const signed long long *p, int num) { |
| 54 |
return vec_xl_len(p, num); |
| 55 |
} |
| 56 |
vector unsigned long long vec_load_ull(unsigned long long *p, int num) { |
| 57 |
return vec_xl_len(p, num); |
| 58 |
} |
| 59 |
vector unsigned long long vec_load_const_ull(const unsigned long long *p, int num) { |
| 60 |
return vec_xl_len(p, num); |
| 61 |
} |
| 62 |
|
| 63 |
vector signed __int128 vec_load_si128(signed __int128 *p, int num) { |
| 64 |
return vec_xl_len(p, num); |
| 65 |
} |
| 66 |
vector signed __int128 vec_load_const_si128(const signed __int128 *p, int num) { |
| 67 |
return vec_xl_len(p, num); |
| 68 |
} |
| 69 |
vector unsigned __int128 vec_load_ui128(unsigned __int128 *p, int num) { |
| 70 |
return vec_xl_len(p, num); |
| 71 |
} |
| 72 |
vector unsigned __int128 vec_load_const_ui128(const unsigned __int128 *p, int num) { |
| 73 |
return vec_xl_len(p, num); |
| 74 |
} |
| 75 |
|
| 76 |
vector float vec_load_f(float *p, int num) { |
| 77 |
return vec_xl_len(p, num); |
| 78 |
} |
| 79 |
vector float vec_load_const_f(const float *p, int num) { |
| 80 |
return vec_xl_len(p, num); |
| 81 |
} |
| 82 |
|
| 83 |
vector double vec_load_d(double *p, int num) { |
| 84 |
return vec_xl_len(p, num); |
| 85 |
} |
| 86 |
vector double vec_load_const_d(const double *p, int num) { |
| 87 |
return vec_xl_len(p, num); |
| 88 |
} |
| 89 |
|