2018-05-17 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr53416.c
blobd00b8752526dbd3358a25bf52056f5dcd5e0e2e0
1 /* PR target/53416 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -mrdrnd" } */
5 int test (void)
7 unsigned int number = 0;
8 int result0, result1, result2, result3;
10 result0 = __builtin_ia32_rdrand32_step (&number);
11 result1 = __builtin_ia32_rdrand32_step (&number);
12 result2 = __builtin_ia32_rdrand32_step (&number);
13 result3 = __builtin_ia32_rdrand32_step (&number);
15 return result0 + result1 +result2 + result3;
18 /* { dg-final { scan-assembler-times "rdrand" 4 } } */