gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-abs.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -mlsx" } */ |
| 3 | /* { dg-final { scan-assembler-times "vsigncov.w" 1 } } */ |
| 4 | /* { dg-final { scan-assembler-times "vsigncov.d" 1 } } */ |
| 5 | |
| 6 | int a[4], b[4]; |
| 7 | |
| 8 | extern int abs (int); |
| 9 | |
| 10 | void |
| 11 | foo1 (void) |
| 12 | { |
| 13 | for (int i = 0; i < 4; i++) |
| 14 | a[i] = abs (b[i]); |
| 15 | } |
| 16 | |
| 17 | long la[2], lb[2]; |
| 18 | |
| 19 | extern long labs (long); |
| 20 | |
| 21 | void |
| 22 | foo2 (void) |
| 23 | { |
| 24 | for (int i = 0; i < 2; i++) |
| 25 | la[i] = labs (lb[i]); |
| 26 | } |