Rebase.
[official-gcc.git] / gcc / testsuite / gcc.target / sh / pr39423-2.c
blob702384dc27a730bad3d344b29253df8c1b4fc732
1 /* Check that displacement addressing is used for indexed addresses with a
2 small offset, instead of re-calculating the index and that the movu.w
3 instruction is used on SH2A. */
4 /* { dg-do compile } */
5 /* { dg-options "-O2" } */
6 /* { dg-skip-if "" { "sh*-*-*" } { "*" } { "-m2a*" } } */
7 /* { dg-final { scan-assembler-not "add\t#1" } } */
8 /* { dg-final { scan-assembler "movu.w" } } */
10 int
11 test_00 (unsigned short tab[], int index)
13 return tab[index + 1];