diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/loongarch/vect-ld-st-imm12.c')
-rw-r--r-- | gcc/testsuite/gcc.target/loongarch/vect-ld-st-imm12.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/loongarch/vect-ld-st-imm12.c b/gcc/testsuite/gcc.target/loongarch/vect-ld-st-imm12.c new file mode 100644 index 0000000..bfc208e --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vect-ld-st-imm12.c @@ -0,0 +1,15 @@ +/* { dg-do compile } */ +/* { dg-options "-march=loongarch64 -mabi=lp64d -mlasx -O2" } */ +/* { dg-final { scan-assembler-not "addi.d" } } */ + +extern short a[1000]; +extern short b[1000]; +extern short c[1000]; + +void +test (void) +{ + for (int i = 501; i < 517; i++) + ((int *)(c + 1))[i] = ((int *)(a + 1))[i] + ((int *)(b + 1))[i]; +} + |