1 /* { dg-do compile } */
2 /* { dg-require-effective-target ilp32 } */
3 /* { dg-options "-O1 -mvis3" } */
4
fnegs(float a)5 float fnegs (float a)
6 {
7 return -a;
8 }
9
fnegd(double a)10 double fnegd (double a)
11 {
12 return -a;
13 }
14
fmuls(float a,float b)15 float fmuls (float a, float b)
16 {
17 return a * b;
18 }
19
fmuld(double a,double b)20 double fmuld (double a, double b)
21 {
22 return a * b;
23 }
24
fsmuld(float a,float b)25 double fsmuld (float a, float b)
26 {
27 return (double)a * (double)b;
28 }
29
fnsmuld(float a,float b)30 double fnsmuld (float a, float b)
31 {
32 return -((double)a * (double)b);
33 }
34
35 /* { dg-final { scan-assembler-times "movwtos\t%" 13 } } */
36 /* { dg-final { scan-assembler "fnegs\t%" } } */
37 /* { dg-final { scan-assembler "fnegd\t%" } } */
38 /* { dg-final { scan-assembler "fmuls\t%" } } */
39 /* { dg-final { scan-assembler "fmuld\t%" } } */
40 /* { dg-final { scan-assembler "fsmuld\t%" } } */
41 /* { dg-final { scan-assembler "fnsmuld\t%" } } */
42