Use gather loads for strided accesses
[official-gcc.git] / gcc / testsuite / gcc.target / nios2 / r2-stio-2.c
blob0a6de908d6eee8351ecbaa28a322da2dfc06576c
1 /* { dg-do compile } */
2 /* { dg-options "-O -mgpopt -march=r2 -mbypass-cache" } */
4 /* Implicit ldio/stio operations must not use GP-relative addresses for
5 small data objects in R2. This is because the address offset field
6 has been reduced to 12 bits in R2, and %gprel is a 16-bit relocation. */
8 extern volatile unsigned int frob;
10 volatile unsigned int frob = 0;
12 void foo (unsigned int val)
14 frob = val;
17 /* { dg-final { scan-assembler "stwio\\t" } } */
18 /* { dg-final { scan-assembler-not "stwio\\t.*%gprel(frob)" } } */