[ARM] Fix PR85203: cmse_nonsecure_caller returns wrong result
[official-gcc.git] / gcc / testsuite / gcc.target / sparc / fpmul-2.c
blob4ead6eed0936a6aa274aed68f6bca02902d43c58
1 /* { dg-do compile } */
2 /* { dg-options "-mcpu=ultrasparc -mvis -O1 -fdump-tree-optimized" } */
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 typedef unsigned char pixel __attribute__((vector_size(4)));
9 typedef short pixel16 __attribute__((vector_size(4)));
11 vec16 foo1 () {
12 pixel a = { (unsigned char)1, (unsigned char)2, (unsigned char)3, (unsigned char)4 };
13 vec16 b = { (short)1, (short)2, (short)3, (short)4 };
14 return __builtin_vis_fmul8x16 (a, b);
17 vec16 foo1_1 () {
18 pixel a = { (unsigned char)1, (unsigned char)1, (unsigned char)1, (unsigned char)1 };
19 vec16 b = { (short)256, (short)512, (short)1024, (short)2048 };
20 return __builtin_vis_fmul8x16 (a, b);
23 vec16 foo1_2 () {
24 pixel a = { (unsigned char)255, (unsigned char)255, (unsigned char)255, (unsigned char)255 };
25 vec16 b = { (short)256, (short)512, (short)1024, (short)32767 };
26 return __builtin_vis_fmul8x16 (a, b);
28 /* { dg-final { scan-assembler-not "fmul8x16\t%" } } */
29 /* { dg-final { scan-tree-dump "{ 0, 0, 0, 0 }" "optimized" } } */
30 /* { dg-final { scan-tree-dump "{ 1, 2, 4, 8 }" "optimized" } } */
31 /* { dg-final { scan-tree-dump "{ 255, 510, 1020, 32639 }" "optimized" } } */
33 vec16 foo2 () {
34 pixel a = { 1, 2, 3, 4 };
35 pixel16 b = { 256, 512 };
36 return __builtin_vis_fmul8x16au (a, b);
38 /* { dg-final { scan-assembler-not "fmul8x16au\t%" } } */
39 /* { dg-final { scan-tree-dump "{ 1, 2, 3, 4 }" "optimized" } } */
41 vec16 foo3 () {
42 pixel a = { 1, 2, 3, 4 };
43 pixel16 b = { 256, 512 };
44 return __builtin_vis_fmul8x16al (a, b);
46 /* { dg-final { scan-assembler-not "fmul8x16al\t%" } } */
47 /* { dg-final { scan-tree-dump "{ 2, 4, 6, 8 }" "optimized" } } */