1 /* { dg-do compile } */
2 /* { dg-require-effective-target powerpc_pcrel } */
3 /* { dg-options "-O2 -mdejagnu-cpu=power10 -mpcrel-opt" } */
8 /* Test whether we get the right number of PCREL_OPT optimizations for int. */
14 return ext
[0]; /* PCREL_OPT relocation. */
20 return ext
[2]; /* PCREL_OPT relocation. */
26 return ext
[LARGE
]; /* No PCREL_OPT (load is prefixed). */
30 get_variable (unsigned long n
)
32 return ext
[n
]; /* No PCREL_OPT (load is indexed). */
38 return (double) ext
[0]; /* No PCREL_OPT (LFIWAX is indexed). */
41 /* { dg-final { scan-assembler-times "R_PPC64_PCREL_OPT" 2 } } */