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