| 1 |
/* Test to verify that the vec_extract from a vector of |
| 2 |
signed longs remains signed. */ |
| 3 |
/* { dg-do run } */ |
| 4 |
/* { dg-options "-ansi -mdejagnu-cpu=power8 " } */ |
| 5 |
/* { dg-require-effective-target p8vector_hw } */ |
| 6 |
|
| 7 |
#include <altivec.h> |
| 8 |
#include <stdio.h> |
| 9 |
#include <stdlib.h> |
| 10 |
|
| 11 |
int test1(signed long long int sl) { |
| 12 |
|
| 13 |
vector signed long long int v = vec_splats(sl); |
| 14 |
|
| 15 |
if (vec_extract (v, 0) > sl) |
| 16 |
abort(); |
| 17 |
return 0; |
| 18 |
} |
| 19 |
|
| 20 |
int main() |
| 21 |
{ |
| 22 |
test1 (0xf600000000000000LL); |
| 23 |
test1 (0x7600000000000000LL); |
| 24 |
test1 (0x0600000000000000LL); |
| 25 |
return 0; |
| 26 |
} |