1  /* { dg-do compile } */
       2  /* { dg-options "-O2 -march=r2 -mbypass-cache" } */
       3  
       4  /* Check that the compiler is aware of the reduced offset range for ldio/stio
       5     instructions in the Nios II R2 encoding.  */
       6  
       7  unsigned int too_big (unsigned int *p)
       8  {
       9    return *(p + 0x400);
      10  }
      11  
      12  unsigned int small_enough (unsigned int *p)
      13  {
      14    return *(p + 0x100);
      15  }
      16  
      17  /* { dg-final { scan-assembler-not "\tldwio\t.*, 4096\\(r.*\\)" } }  */
      18  /* { dg-final { scan-assembler "\tldwio\t.*, 1024\\(r.*\\)" } }  */