2017-08-06 Andrew Pinski <apinski@cavium.com>
[official-gcc.git] / gcc / testsuite / gcc.target / aarch64 / target_attr_3.c
blobeacec5a655298dab09901b6c235dd978bc66cdf5
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -mno-fix-cortex-a53-835769 -march=armv8-a -mcpu=generic -save-temps" } */
4 /* Check that the attribute overrides the command line option
5 and the fix is applied once. */
7 __attribute__ ((target ("fix-cortex-a53-835769")))
8 unsigned long long
9 test (unsigned long long a, double b, unsigned long long c,
10 unsigned long long d, unsigned long long *e)
12 double result;
13 volatile unsigned long long tmp = *e;
14 __asm__ __volatile ("// %0, %1"
15 : "=w" (result)
16 : "0" (b)
17 : /* No clobbers. */);
18 return c * d + d;
21 unsigned long long
22 test2 (unsigned long long a, double b, unsigned long long c,
23 unsigned long long d, unsigned long long *e)
25 double result;
26 volatile unsigned long long tmp = *e;
27 __asm__ __volatile ("// %0, %1"
28 : "=w" (result)
29 : "0" (b)
30 : /* No clobbers. */);
31 return c * d + d;
34 /* { dg-final { scan-assembler-times "between mem op and" 1 } } */