aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/powerpc/darn-3.c
blob: 4c68fad80d5dd1b9fd5354a06228a6dd1661cd8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* { dg-do compile } */
/* { dg-skip-if "" { powerpc*-*-aix* } } */
/* { dg-options "-O2 -mdejagnu-cpu=power9" } */

static int darn32(void) { return __builtin_darn_32(); }

int four(void)
{
	int sum = 0;
	int i;
	for (i = 0; i < 4; i++)
		sum += darn32();
	return sum;
}

/* { dg-final { scan-assembler-times {(?n)\mdarn .*,0\M} 4 } } */