2018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gcc.target / aarch64 / prfm_imm_offset_1.c
blob26ab9139cbc2395792d7f4fe0fa123c1b0359109
1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
4 /* Check that we can generate the immediate-offset addressing
5 mode for PRFM. */
7 #define ARRSIZE 65
8 int *bad_addr[ARRSIZE];
10 void
11 prefetch_for_read (void)
13 int i;
14 for (i = 0; i < ARRSIZE; i++)
15 __builtin_prefetch (bad_addr[i] + 2, 0, 0);
18 /* { dg-final { scan-assembler-times "prfm.*\\\[x\[0-9\]+, 8\\\]" 1 } } */