2014-10-24 Christophe Lyon <christophe.lyon@linaro.org>
[official-gcc.git] / gcc / testsuite / gcc.target / sparc / fpmerge-2.c
blob524c736f5d7b3cc8952ac00e568a8c09856a8deb
1 /* { dg-do compile } */
2 /* { dg-options "-mcpu=ultrasparc -mvis -O1 -fdump-tree-optimized" } */
3 typedef unsigned char pixel __attribute__((vector_size(8)));
4 typedef unsigned char vec8 __attribute__((vector_size(4)));
6 #define _(ARG) (unsigned char)ARG
8 pixel foo () {
9 vec8 a = { _(1), _(3), _(5), _(7) };
10 vec8 b = { _(2), _(4), _(6), _(8) };
11 return __builtin_vis_fpmerge (a, b);
14 /* { dg-final { scan-assembler-not "fpmerge\t%" } } */
15 /* { dg-final { scan-tree-dump "{ 1, 2, 3, 4, 5, 6, 7, 8 }" "optimized" } } */
16 /* { dg-final { cleanup-tree-dump "optimized" } } */