2014-10-24 Christophe Lyon <christophe.lyon@linaro.org>
[official-gcc.git] / gcc / testsuite / gcc.target / sparc / align.c
blob804ca9397f3469faab64da6b98bef23b3e561a43
1 /* { dg-do compile } */
2 /* { dg-options "-mcpu=ultrasparc -mvis" } */
3 typedef long long int64_t;
4 typedef int vec32 __attribute__((vector_size(8)));
5 typedef short vec16 __attribute__((vector_size(8)));
6 typedef unsigned char vec8 __attribute__((vector_size(8)));
8 vec16 foo1 (vec16 a, vec16 b) {
9 return __builtin_vis_faligndatav4hi (a, b);
12 vec32 foo2 (vec32 a, vec32 b) {
13 return __builtin_vis_faligndatav2si (a, b);
16 vec8 foo3 (vec8 a, vec8 b) {
17 return __builtin_vis_faligndatav8qi (a, b);
20 int64_t foo4 (int64_t a, int64_t b) {
21 return __builtin_vis_faligndatadi (a, b);
24 unsigned char * foo5 (unsigned char *data) {
25 return __builtin_vis_alignaddr (data, 0);
28 /* { dg-final { scan-assembler-times "faligndata" 4 } } */
29 /* { dg-final { scan-assembler "alignaddr.*%g0" } } */