gcc/testsuite/gcc.dg/tree-ssa/absfloat16.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-require-effective-target float16 } */ |
| 3 | /* { dg-options "-Ofast -fdump-tree-optimized" } */ |
| 4 | /* { dg-add-options float16 } */ |
| 5 | /* { dg-final { scan-tree-dump-times " = ABS_EXPR <x_\[0-9]*\\\(D\\\)>;" 1 "optimized" } } */ |
| 6 | |
| 7 | _Float16 absfloat16(_Float16 x) { |
| 8 | if (x < 0.0f) { |
| 9 | return -x; |
| 10 | } else { |
| 11 | return x; |
| 12 | } |
| 13 | } |
| 14 |