gcc/testsuite/gcc.target/loongarch/arch-func-attr-1.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -march=loongarch64 -mno-lsx -std=gnu11" } */ |
| 3 | |
| 4 | extern char a[64]; |
| 5 | extern char b[64]; |
| 6 | |
| 7 | #ifndef TEST_TARGET_PRAGMA |
| 8 | __attribute__ ((target ("arch=la64v1.1"))) |
| 9 | #else |
| 10 | #pragma GCC target ("arch=la64v1.1") |
| 11 | #endif |
| 12 | void |
| 13 | test (void) |
| 14 | { |
| 15 | for (int i = 0; i < 64; i++) |
| 16 | a[i] = b[i]; |
| 17 | } |
| 18 | |
| 19 | |
| 20 | /* { dg-final { scan-assembler "vld" } } */ |