Handle T_HRESULT types in CodeView records
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / altivec-11.c
blob217ec5342fe24bddb02d3e5e0a7f012cce6218a6
1 /* { dg-do compile { target powerpc*-*-* } } */
2 /* { dg-options "-O2 -maltivec -mno-vsx -mabi=altivec" } */
3 /* { dg-require-effective-target powerpc_altivec } */
4 /* { dg-final { scan-assembler-not "lvx" } } */
5 #include <altivec.h>
7 void foo (vector int);
8 void foo_s (vector short);
9 void foo_c (vector char);
11 /* All constants should be loaded into vector register without
12 load from memory. */
13 void
14 bar (void)
16 foo ((vector int) {0, 0, 0, 0});
17 foo ((vector int) {1, 1, 1, 1});
18 foo ((vector int) {15, 15, 15, 15});
19 foo ((vector int) {-16, -16, -16, -16});
20 foo ((vector int) {0x10001, 0x10001, 0x10001, 0x10001});
21 foo ((vector int) {0xf000f, 0xf000f, 0xf000f, 0xf000f});
22 foo ((vector int) {0xfff0fff0, 0xfff0fff0, 0xfff0fff0, 0xfff0fff0});
23 foo ((vector int) {0x1010101, 0x1010101, 0x1010101, 0x1010101});
24 foo ((vector int) {0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f});
25 foo ((vector int) {0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0});
26 foo ((vector int) {0x10101010, 0x10101010, 0x10101010, 0x10101010});
27 foo ((vector int) {0x1e1e1e1e, 0x1e1e1e1e, 0x1e1e1e1e, 0x1e1e1e1e});
28 foo ((vector int) {0x100010, 0x100010, 0x100010, 0x100010});
29 foo ((vector int) {0x1e001e, 0x1e001e, 0x1e001e, 0x1e001e});
30 foo ((vector int) {0x10, 0x10, 0x10, 0x10});
31 foo ((vector int) {0x1e, 0x1e, 0x1e, 0x1e});
33 foo_s ((vector short int) {0, 0, 0, 0, 0, 0, 0, 0});
34 foo_s ((vector short int) {1, 1, 1, 1, 1, 1, 1, 1});
35 foo_s ((vector short int) {15, 15, 15, 15, 15, 15, 15, 15});
36 foo_s ((vector short int) {-16, -16, -16, -16, -16, -16, -16, -16});
37 foo_s ((vector short int) {0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0,
38 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0});
39 foo_s ((vector short int) {0xf0f, 0xf0f, 0xf0f, 0xf0f,
40 0xf0f, 0xf0f, 0xf0f, 0xf0f});
41 foo_s ((vector short int) {0x1010, 0x1010, 0x1010, 0x1010,
42 0x1010, 0x1010, 0x1010, 0x1010});
43 foo_s ((vector short int) {0x1e1e, 0x1e1e, 0x1e1e, 0x1e1e,
44 0x1e1e, 0x1e1e, 0x1e1e, 0x1e1e});
46 foo_c ((vector char) {0, 0, 0, 0, 0, 0, 0, 0,
47 0, 0, 0, 0, 0, 0, 0, 0});
48 foo_c ((vector char) {1, 1, 1, 1, 1, 1, 1, 1,
49 1, 1, 1, 1, 1, 1, 1, 1});
50 foo_c ((vector char) {15, 15, 15, 15, 15, 15, 15, 15,
51 15, 15, 15, 15, 15, 15, 15, 15});
52 foo_c ((vector char) {-16, -16, -16, -16, -16, -16, -16, -16,
53 -16, -16, -16, -16, -16, -16, -16, -16});
54 foo_c ((vector char) {16, 16, 16, 16, 16, 16, 16, 16,
55 16, 16, 16, 16, 16, 16, 16, 16});
56 foo_c ((vector char) {30, 30, 30, 30, 30, 30, 30, 30,
57 30, 30, 30, 30, 30, 30, 30, 30});