[testsuite] require sqrt_insn effective target where needed
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / pr62147.c
blob635c73711da153fedd6f83e14f012dffc6e31593
1 /* { dg-do compile { target { powerpc*-*-* } } } */
2 /* { dg-options "-O2 -fno-tree-loop-distribute-patterns" } */
4 /* Note that it's required to disable loop-distribute-patterns, otherwise the
5 loop will be optimized to memset. */
7 /* Expect loop_iv can know the loop is finite so the doloop_optimize
8 can perform the doloop transformation. */
10 typedef struct {
11 int l;
12 int b[258];
13 } S;
15 void clear (S* s )
17 int i;
18 int len = s->l + 1;
20 for (i = 0; i <= len; i++)
21 s->b[i] = 0;
24 /* { dg-final { scan-assembler {\mbdnz\M} } } */