blob: c50c4ba14210ab0a612262ccf546a76b65f8de63 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
/* PR target/45670 */
/* { dg-do compile } */
/* { dg-options "-Os -mtune=generic" } */
struct S
{
float *buf;
int size;
};
void
foo (struct S *s)
{
int i;
for (i = 0; i < s->size; ++i)
s->buf[i] = 0;
}
/* Ensure we don't generate
lea (reg1,4),reg2; add (reg3),reg2; movl $0, (reg2)
instead of smaller
mov (reg3),reg2; movl $0, (reg2,reg1,4) */
/* { dg-final { scan-assembler-not "lea\[lq\]" } } */
|