1 /* { dg-do compile } */
2 /* { dg-options "-O2 -mcpu=ultrasparc -mvis" } */
3 typedef unsigned char pixel
__attribute__((vector_size(4)));
4 typedef unsigned char vec8
__attribute__((vector_size(8)));
5 typedef short vec16
__attribute__((vector_size(8)));
7 vec16
foo (pixel a
, pixel b
) {
8 vec8 c
= __builtin_vis_fpmerge (a
, b
);
9 vec16 d
= { -1, -1, -1, -1 };
10 vec16 e
= __builtin_vis_fmul8x16 (a
, d
);
16 vec16 d
= { 0, 0, 0, 0 };
17 vec16 e
= __builtin_vis_fmul8x16 (a
, d
); /* Mulitplication by 0 = 0. */
22 /* { dg-final { scan-assembler "fmul8x16" } } */
23 /* { dg-final { scan-assembler "fzero" } } */