aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/sh/pr56547-1.c
blob: 0c7c97e81dd8cb038eb9f97ea75cb8cb264df864 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* Verify that the fmac insn is used for the expression 'a * b + a' and
   'a * a + a'.
   This assumes that the default compiler setting is -ffp-contract=fast.  */
/* { dg-do compile }  */
/* { dg-options "-O1" } */
/* { dg-skip-if "" { "sh*-*-*" } { "-m1" "-m2" "-m3" "-m4al" "*nofpu" "-m4-340*" "-m4-400*" "-m4-500*" "-m5*" } { "" } }  */
/* { dg-final { scan-assembler-times "fmac" 2 } } */

float
test_00 (float a, float b)
{
  return a * b + a;
}

float
test_01 (float a)
{
  return a * a + a;
}