Add an UNSPEC_PROLOGUE_USE to prevent the link register from being considered dead.
[official-gcc.git] / gcc / testsuite / gcc.misc-tests / i386-pf-none-1.c
blobbdd236ade8837a46262a3372d035ff2ffbf18ec4
1 /* Test that data prefetch instructions are not generated for i386 variants
2 that do not support those instructions. */
4 /* { dg-do compile { target i?86-*-* } } */
6 char *msg = "howdy there";
8 void foo (char *p)
10 __builtin_prefetch (p, 0, 0);
11 __builtin_prefetch (p, 0, 1);
12 __builtin_prefetch (p, 0, 2);
13 __builtin_prefetch (p, 0, 3);
14 __builtin_prefetch (p, 1, 0);
15 __builtin_prefetch (p, 1, 1);
16 __builtin_prefetch (p, 1, 2);
17 __builtin_prefetch (p, 1, 3);
20 int main ()
22 foo (msg);
23 exit (0);
26 /* { dg-final { scan-assembler-not "fetch" } } */