1 /* { dg-do compile } */
2 /* { dg-options "-mcpu=ultrasparc -mvis" } */
3 typedef int vec32
__attribute__((vector_size(8)));
4 typedef short vec16
__attribute__((vector_size(8)));
5 typedef unsigned char pixel
__attribute__((vector_size(4)));
6 typedef short pixel16
__attribute__((vector_size(4)));
7 typedef unsigned char vec8
__attribute__((vector_size(8)));
9 vec16
foo1 (pixel a
, vec16 b
) {
10 return __builtin_vis_fmul8x16 (a
, b
);
13 vec16
foo2 (pixel a
, pixel16 b
) {
14 return __builtin_vis_fmul8x16au (a
, b
);
17 vec16
foo3 (pixel a
, pixel16 b
) {
18 return __builtin_vis_fmul8x16al (a
, b
);
21 vec16
foo4 (vec8 a
, vec16 b
) {
22 return __builtin_vis_fmul8sux16 (a
, b
);
25 vec16
foo5 (vec8 a
, vec16 b
) {
26 return __builtin_vis_fmul8ulx16 (a
, b
);
29 vec32
foo6 (pixel a
, pixel16 b
) {
30 return __builtin_vis_fmuld8sux16 (a
, b
);
33 vec32
foo7 (pixel a
, pixel16 b
) {
34 return __builtin_vis_fmuld8ulx16 (a
, b
);
37 /* { dg-final { scan-assembler "fmul8x16\t%" } } */
38 /* { dg-final { scan-assembler "fmul8x16au\t%" } } */
39 /* { dg-final { scan-assembler "fmul8x16al\t%" } } */
40 /* { dg-final { scan-assembler "fmul8sux16\t%" } } */
41 /* { dg-final { scan-assembler "fmul8ulx16\t%" } } */
42 /* { dg-final { scan-assembler "fmuld8sux16\t%" } } */
43 /* { dg-final { scan-assembler "fmuld8ulx16\t%" } } */