| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O3" } */ |
| 3 |
|
| 4 |
float f0(void) |
| 5 |
{ |
| 6 |
float x = 0.0f; |
| 7 |
return x; |
| 8 |
} |
| 9 |
|
| 10 |
float fn1(void) |
| 11 |
{ |
| 12 |
float x = -0.0f; |
| 13 |
return x; |
| 14 |
} |
| 15 |
|
| 16 |
float f1(void) |
| 17 |
{ |
| 18 |
float x = 256.0f; |
| 19 |
return x; |
| 20 |
} |
| 21 |
|
| 22 |
float f2(void) |
| 23 |
{ |
| 24 |
float x = 123256.0f; |
| 25 |
return x; |
| 26 |
} |
| 27 |
|
| 28 |
float f3(void) |
| 29 |
{ |
| 30 |
float x = 2.0f; |
| 31 |
return x; |
| 32 |
} |
| 33 |
|
| 34 |
float f4(void) |
| 35 |
{ |
| 36 |
float x = -20000.1; |
| 37 |
return x; |
| 38 |
} |
| 39 |
|
| 40 |
|
| 41 |
/* { dg-final { scan-assembler-times "movi\tv\[0-9\]+\\\.2s, ?#0" 1 } } */ |
| 42 |
/* { dg-final { scan-assembler-times "movi\tv\[0-9\]+\\\.2s, 0x80, lsl 24" 1 } } */ |
| 43 |
/* { dg-final { scan-assembler-times "movi\tv\[0-9\]+\\\.2s, 0x80, lsl 24" 1 } } */ |
| 44 |
|
| 45 |
/* { dg-final { scan-assembler-times "mov\tw\[0-9\]+, 48128" 1 } } */ |
| 46 |
/* { dg-final { scan-assembler-times "movk\tw\[0-9\]+, 0x47f0, lsl 16" 1 } } */ |
| 47 |
|
| 48 |
/* { dg-final { scan-assembler-times "fmov\ts\[0-9\]+, 2\\\.0e\\\+0" 1 } } */ |
| 49 |
|
| 50 |
/* { dg-final { scan-assembler-times "mov\tw\[0-9\]+, 16435" 1 } } */ |
| 51 |
/* { dg-final { scan-assembler-times "movk\tw\[0-9\]+, 0xc69c, lsl 16" 1 } } */ |
| 52 |
|