gcc/testsuite/gcc.target/sh/pr56547-1.c
raw| 1 | /* Verify that the fmac insn is used for the expression 'a * b + a' and |
| 2 | 'a * a + a'. |
| 3 | This assumes that the default compiler setting is -ffp-contract=fast. */ |
| 4 | /* { dg-do compile { target { any_fpu } } } */ |
| 5 | /* { dg-options "-O1" } */ |
| 6 | /* { dg-final { scan-assembler-times "fmac" 2 } } */ |
| 7 | |
| 8 | float |
| 9 | test_00 (float a, float b) |
| 10 | { |
| 11 | return a * b + a; |
| 12 | } |
| 13 | |
| 14 | float |
| 15 | test_01 (float a) |
| 16 | { |
| 17 | return a * a + a; |
| 18 | } |