gcc/testsuite/gcc.target/arm/fp16-compile-vcvt.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-require-effective-target arm_fp16_ok } */ |
| 3 | /* { dg-options "-mfp16-format=ieee" } */ |
| 4 | /* { dg-add-options arm_fp16 } */ |
| 5 | |
| 6 | /* Test generation of VFP __fp16 instructions. */ |
| 7 | |
| 8 | __fp16 h1 = 0.0; |
| 9 | __fp16 h2 = 1234.0; |
| 10 | float f1 = 2.0; |
| 11 | float f2 = -999.9; |
| 12 | |
| 13 | void f (void) |
| 14 | { |
| 15 | h1 = f1; |
| 16 | f2 = h2; |
| 17 | } |
| 18 | |
| 19 | /* { dg-final { scan-assembler "\tvcvtb.f32.f16" } } */ |
| 20 | /* { dg-final { scan-assembler "\tvcvtb.f16.f32" } } */ |