Imported Upstream version 4.7.2
[platform/upstream/gcc48.git] / gcc / testsuite / gcc.target / m68k / pr36134.c
1 /* pr36134.c
2
3    This test ensures that the shorter LEA instruction is used in preference
4    to the longer ADD instruction.  */
5
6 /* { dg-do compile }  */
7 /* { dg-options "-O2" }  */
8 /* { dg-final { scan-assembler "lea" } } */
9 /* { dg-final { scan-assembler-not "add" } } */
10
11 int *a, *b;
12
13 void
14 f ()
15 {
16   while (a > b)
17     {
18       *a++ = *b++;
19       *a++ = *b++;
20       *a++ = *b++;
21       *a++ = *b++;
22     }
23 }