summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/powerpc/fold-vec-st-int.c
blob: 4db35f0dd945c2686c4ab3d603499e5aa5bfde50 (plain)
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
74
75
76
77
78
79
80
81
82
83
84
/* Verify that overloaded built-ins for vec_st* with int
   inputs produce the right code.  */

/* { dg-do compile } */
/* { dg-require-effective-target powerpc_altivec_ok } */
/* { dg-options "-maltivec -O2" } */

#include <altivec.h>
// void vec_st (vector signed int, int, vector signed int *);

void
testst_1 (vector signed int vsi1, int i1, vector signed int * vsip)
{
	return vec_st(vsi1, i1, vsip);
}
void
testst_2 (vector signed int vsi1, int i1, signed int * sip)
{
	return vec_st(vsi1, i1, sip);
}
void
testst_3 (vector unsigned int vui1, int i1, vector unsigned int * vsip)
{
	return vec_st(vui1, i1, vsip);
}
void
testst_4 (vector unsigned int vui1, int i1, unsigned int * sip)
{
	return vec_st(vui1, i1, sip);
}
void
testst_5 (vector bool int vbi1, int i1, vector bool int * vbip)
{
	return vec_st(vbi1, i1, vbip);
}
void
testst_6 (vector bool int vbi1, int i1, unsigned int * vuip)
{
	return vec_st(vbi1, i1, vuip);
}
void
testst_7 (vector bool int vbi1, int i1, signed int * vsip)
{
	return vec_st(vbi1, i1, vsip);
}

void
testst_cst1 (vector signed int vsi1, int i1, vector signed int * vsip)
{
	return vec_st(vsi1, 12, vsip);
}
void
testst_cst2 (vector signed int vsi1, int i1, signed int * sip)
{
	return vec_st(vsi1, 16, sip);
}
void
testst_cst3 (vector unsigned int vui1, int i1, vector unsigned int * vsip)
{
	return vec_st(vui1, 20, vsip);
}
void
testst_cst4 (vector unsigned int vui1, int i1, unsigned int * sip)
{
	return vec_st(vui1, 24, sip);
}
void
testst_cst5 (vector bool int vbi1, int i1, vector bool int * vbip)
{
	return vec_st(vbi1, 28, vbip);
}
void
testst_cst6 (vector bool int vbi1, int i1, unsigned int * vuip)
{
	return vec_st(vbi1, 32, vuip);
}
void
testst_cst7 (vector bool int vbi1, int i1, signed int * vsip)
{
	return vec_st(vbi1, 36, vsip);
}

/* { dg-final { scan-assembler-times {\mstvx\M}  14 } } */