Merge from mainline (165734:167278).
[official-gcc/graphite-test-results.git] / gcc / testsuite / gcc.target / i386 / pr45670.c
blobc50c4ba14210ab0a612262ccf546a76b65f8de63
1 /* PR target/45670 */
2 /* { dg-do compile } */
3 /* { dg-options "-Os -mtune=generic" } */
5 struct S
7 float *buf;
8 int size;
9 };
11 void
12 foo (struct S *s)
14 int i;
15 for (i = 0; i < s->size; ++i)
16 s->buf[i] = 0;
19 /* Ensure we don't generate
20 lea (reg1,4),reg2; add (reg3),reg2; movl $0, (reg2)
21 instead of smaller
22 mov (reg3),reg2; movl $0, (reg2,reg1,4) */
23 /* { dg-final { scan-assembler-not "lea\[lq\]" } } */