blob: 2c80dc8fc3f22c019fd92d72c78d992acedb674a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
/* { dg-do compile } */
/* { dg-options "-O2 -frounding-math" } */
double
foo_d (double a, double b)
{
/* { dg-final { scan-assembler "fneg\\td\[0-9\]+, d\[0-9\]+" } } */
/* { dg-final { scan-assembler "fmul\\td\[0-9\]+, d\[0-9\]+, d\[0-9\]+" } } */
return -a * b;
}
float
foo_s (float a, float b)
{
/* { dg-final { scan-assembler "fneg\\ts\[0-9\]+, s\[0-9\]+" } } */
/* { dg-final { scan-assembler "fmul\\ts\[0-9\]+, s\[0-9\]+, s\[0-9\]+" } } */
return -a * b;
}
|