gcc/testsuite/gcc.target/loongarch/const-double-zero-stx.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -maddr-reg-reg-cost=1" } */ |
| 3 | /* { dg-final { scan-assembler-times {stx\..\t\$r0} 2 } } */ |
| 4 | |
| 5 | extern float arr_f[]; |
| 6 | extern double arr_d[]; |
| 7 | |
| 8 | void |
| 9 | test_f (int base, int index) |
| 10 | { |
| 11 | arr_f[base + index] = 0.0; |
| 12 | } |
| 13 | |
| 14 | void |
| 15 | test_d (int base, int index) |
| 16 | { |
| 17 | arr_d[base + index] = 0.0; |
| 18 | } |