| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-march=rv32i -mabi=ilp32 -O" { target { rv32 } } } */ |
| 3 |
/* { dg-options "-march=rv64i -mabi=lp64 -O" { target { rv64 } } } */ |
| 4 |
|
| 5 |
/* 1) bf -> sf (call __extendbfsf2) */ |
| 6 |
/* 2) sf -> bf (call __truncsfbf2) */ |
| 7 |
__attribute__ ((noinline)) __bf16 add (__bf16 a, __bf16 b) { return a + b; } |
| 8 |
|
| 9 |
__bf16 test(__bf16 a, __bf16 b) { return add (a, b); } |
| 10 |
|
| 11 |
/* { dg-final { scan-assembler-times "call\t__extendbfsf2" 2 } } */ |
| 12 |
/* { dg-final { scan-assembler-times "call\t__truncsfbf2" 1 } } */ |