1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
/* { dg-do compile */
/* { dg-require-effective-target p8vector_ok } */
/* { dg-options "-mdejagnu-cpu=power8" } */
#include <stdlib.h>
#include <stdio.h>
#include <altivec.h>
vector double retd;
vector float retf;
vector signed int retsi;
void test_int(vector signed int a, const int b)
{
retf = vec_ctf(a,b); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
retf = vec_ctf(a,-1); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
retf = vec_ctf(a,-31); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
retf = vec_ctf(a,-32); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
retf = vec_ctf(a,1);
retf = vec_ctf(a,31);
retf = vec_ctf(a,32); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
retf = vec_ctf(a,42); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
}
void test_uint(vector unsigned int a, const int b)
{
retf = vec_ctf(a,b); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
retf = vec_ctf(a,-1); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
retf = vec_ctf(a,-31); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
retf = vec_ctf(a,-32); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
retf = vec_ctf(a,1);
retf = vec_ctf(a,31);
retf = vec_ctf(a,32); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
retf = vec_ctf(a,42); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
}
void test_longlong(vector signed long long a, const int b,int x)
{
retd = vec_ctf(a,b); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
retd = vec_ctf(a,-1); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
retd = vec_ctf(a,-31); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
retd = vec_ctf(a,-32); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
retd = vec_ctf(a,1);
retd = vec_ctf(a,31);
retd = vec_ctf(a,32); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
retd = vec_ctf(a,42); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
}
void test_ulonglong(vector unsigned long long a, const int b,int x)
{
retd = vec_ctf(a,b); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
retd = vec_ctf(a,-1); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
retd = vec_ctf(a,-31); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
retd = vec_ctf(a,-32); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
retd = vec_ctf(a,1);
retd = vec_ctf(a,31);
retd = vec_ctf(a,32); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
retd = vec_ctf(a,42); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
}
void test_cts_1(vector float a, const int b)
{
retsi = vec_cts(a,b); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
retsi = vec_cts(a,-1); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
retsi = vec_cts(a,-31); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
retsi = vec_cts(a,-32); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
retsi = vec_cts(a,1);
retsi = vec_cts(a,31);
retsi = vec_cts(a,32); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
retsi = vec_cts(a,42); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
}
|