blob: aa11b2e6ef78fe98458acd9c633d6b4b1d00a799 [file] [log] [blame]
// { dg-do compile }
// { dg-options "-O2 -fdump-tree-cunrolli-details" }
template <typename T>
void
foo (T *a, T *b, T *c)
{
#pragma GCC unroll 8
for (int i = 0; i < 8; i++)
a[i] = b[i] * c[i];
}
void
bar (int *a, int *b, int *c)
{
foo <int> (a, b, c);
}
// { dg-final { scan-tree-dump "loop with 8 iterations completely unrolled" "cunrolli" } }